|
@@ -9,8 +9,8 @@
|
|
|
:closeOnClickOverlay="false"
|
|
|
>
|
|
|
<view class="pop-content">
|
|
|
- <!-- 出库 -->
|
|
|
- <view class="pop-main" v-if="info.type==2">
|
|
|
+ <!-- 出库 -->
|
|
|
+ <view class="pop-main" v-if="info.type == 2">
|
|
|
<view class="flex_box flex-row-center pd-30">
|
|
|
<view class="qr-code">
|
|
|
<uqrcode
|
|
@@ -26,16 +26,18 @@
|
|
|
<view class="item-value">{{ info.number }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <tki-barcode
|
|
|
+ <tki-barcode
|
|
|
+ ref="skubarCode"
|
|
|
:show="showBarCode"
|
|
|
:val="barcodeVal"
|
|
|
- cid="sku-barcode1"
|
|
|
+ cid="sku-barcode1"
|
|
|
:opations="{
|
|
|
width: 1,
|
|
|
height: 100,
|
|
|
displayValue: true,
|
|
|
margin: 10,
|
|
|
}"
|
|
|
+ :loadMake="false"
|
|
|
/>
|
|
|
<view class="tips-value">请确认打印条码数量</view>
|
|
|
<view class="num-box">
|
|
@@ -45,33 +47,36 @@
|
|
|
:min="0"
|
|
|
></u-number-box>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <!-- 入库 -->
|
|
|
- <view class="pop-main" v-if="info.type==1">
|
|
|
- <!-- sku -->
|
|
|
- <tki-barcode
|
|
|
+ </view>
|
|
|
+ <!-- 入库 -->
|
|
|
+ <view class="pop-main" v-if="info.type == 1">
|
|
|
+ <!-- sku -->
|
|
|
+ <tki-barcode
|
|
|
+ ref="skubarCode1"
|
|
|
:show="showBarCode"
|
|
|
:val="barcodeVal"
|
|
|
- cid="sku-barcode"
|
|
|
+ cid="sku-barcode"
|
|
|
:opations="{
|
|
|
width: 1,
|
|
|
height: 100,
|
|
|
displayValue: true,
|
|
|
margin: 10,
|
|
|
}"
|
|
|
+ :loadMake="false"
|
|
|
/>
|
|
|
- <!-- 批次号(入库已完成) -->
|
|
|
- <tki-barcode
|
|
|
- v-if="info.status==2"
|
|
|
- :show="showBarCode"
|
|
|
+ <!-- 批次号(入库已完成) -->
|
|
|
+ <tki-barcode
|
|
|
+ ref="batchNumber"
|
|
|
+ :show="showBarCode && info.status == 2"
|
|
|
:val="batchNumberVal"
|
|
|
- cid="batch-barcode"
|
|
|
+ cid="batch-barcode"
|
|
|
:opations="{
|
|
|
width: 1,
|
|
|
height: 100,
|
|
|
displayValue: true,
|
|
|
margin: 10,
|
|
|
}"
|
|
|
+ :loadMake="false"
|
|
|
/>
|
|
|
<view class="tips-value">请确认打印条码数量</view>
|
|
|
<view class="num-box">
|
|
@@ -118,28 +123,28 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
- /**
|
|
|
- * 入库显示条码号、批次号(显示:订单状态且为已入库)
|
|
|
- * 出库显示二维码(订单编号)、发货客户名称、发货商品sku
|
|
|
- */
|
|
|
+ /**
|
|
|
+ * 入库显示条码号、批次号(显示:订单状态且为已入库)
|
|
|
+ * 出库显示二维码(订单编号)、发货客户名称、发货商品sku
|
|
|
+ */
|
|
|
info: {
|
|
|
type: Object,
|
|
|
default: () => ({
|
|
|
customerName: "", // 客户名称
|
|
|
number: "", // 订单编号
|
|
|
barCode: "", // 商品条码
|
|
|
- batchNumber: "", // 批次号
|
|
|
- type: null, // 入库:1 出库;2
|
|
|
+ batchNumber: "", // 批次号
|
|
|
+ type: null, // 入库:1 出库;2
|
|
|
status: "", // 订单状态 入库状态为2才有批次号,出库不显示批次号
|
|
|
}),
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
barcodeVal() {
|
|
|
- return this.info.barCode?`SKU-${this.info.barCode}`:"";
|
|
|
+ return this.info.barCode ? `SKU-${this.info.barCode}` : "";
|
|
|
},
|
|
|
batchNumberVal() {
|
|
|
- return this.info.batchNumber?`PC${this.info.batchNumber}`:"";
|
|
|
+ return this.info.batchNumber ? `PC${this.info.batchNumber}` : "";
|
|
|
},
|
|
|
},
|
|
|
data() {
|
|
@@ -158,6 +163,14 @@ export default {
|
|
|
handleOpen() {
|
|
|
this.printNum = 1;
|
|
|
this.showBarCode = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.info.type == 1) {
|
|
|
+ this.$refs.skubarCode1._makeCode();
|
|
|
+ this.$refs.batchNumber._makeCode();
|
|
|
+ } else {
|
|
|
+ this.$refs.skubarCode._makeCode();
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
handleConfirm() {
|
|
|
const params = {
|
|
@@ -167,8 +180,8 @@ export default {
|
|
|
customerName: this.info.customerName, //客户名
|
|
|
number: this.info.number, // 单据编号
|
|
|
batchNumber: this.info.batchNumber, // 批次号
|
|
|
- type: this.info.type, // 入库:1 出库;2
|
|
|
- status: this.info.status, // 订单状态 入库状态为2才有批次号,出库不显示批次号
|
|
|
+ type: this.info.type, // 入库:1 出库;2
|
|
|
+ status: this.info.status, // 订单状态 入库状态为2才有批次号,出库不显示批次号
|
|
|
},
|
|
|
};
|
|
|
this.$emit("confirm", params);
|