|
@@ -99,41 +99,53 @@
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
|
<uni-popup ref="printerDialog" type="dialog">
|
|
<uni-popup ref="printerDialog" type="dialog">
|
|
- <uni-popup-dialog type="info" cancelText="关闭" confirmText="打印" title="打印尾程面单" @confirm="printConfirm">
|
|
|
|
- <template #default>
|
|
|
|
- <view v-if="printerList">
|
|
|
|
- <uni-data-checkbox
|
|
|
|
- multiple
|
|
|
|
- v-model="downloadFile"
|
|
|
|
- :disabled="true"
|
|
|
|
- :localdata="[
|
|
|
|
- {
|
|
|
|
- text: '下载文件',
|
|
|
|
- value: 1
|
|
|
|
- }
|
|
|
|
- ]"
|
|
|
|
- >
|
|
|
|
- >
|
|
|
|
- </uni-data-checkbox>
|
|
|
|
|
|
+ <view style="width: 90%; margin: 0 auto; min-height: 250px; background-color: #fff; border-radius: 5px">
|
|
|
|
+ <view class="" style="font-size: 20px; border-bottom: 1px solid #e1e1e1; padding: 15px 10px">
|
|
|
|
+ <view type="info" cancelText="关闭" confirmText="打印" title="打印尾程面单" @confirm="printConfirm">
|
|
|
|
+ <view style="margin-bottom: 20px">
|
|
|
|
+ <text>打印尾程面单</text>
|
|
|
|
+ </view>
|
|
<view>
|
|
<view>
|
|
- <uni-data-checkbox
|
|
|
|
- multiple
|
|
|
|
- v-model="sendToPeinter"
|
|
|
|
- :localdata="[
|
|
|
|
- {
|
|
|
|
- text: '发送到标签打印机打印',
|
|
|
|
- value: 1
|
|
|
|
- }
|
|
|
|
- ]"
|
|
|
|
- @change="sendToPeinterFun"
|
|
|
|
- >
|
|
|
|
|
|
+ <view v-if="printerList">
|
|
|
|
+ <uni-data-checkbox
|
|
|
|
+ multiple
|
|
|
|
+ v-model="downloadFile"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ :localdata="[
|
|
|
|
+ {
|
|
|
|
+ text: '下载文件',
|
|
|
|
+ value: 1
|
|
|
|
+ }
|
|
|
|
+ ]"
|
|
>
|
|
>
|
|
- </uni-data-checkbox>
|
|
|
|
- <uni-data-checkbox v-model="selectPrinter" :localdata="printers"></uni-data-checkbox>
|
|
|
|
|
|
+ >
|
|
|
|
+ </uni-data-checkbox>
|
|
|
|
+ <view>
|
|
|
|
+ <uni-data-checkbox
|
|
|
|
+ multiple
|
|
|
|
+ v-model="sendToPeinter"
|
|
|
|
+ :localdata="[
|
|
|
|
+ {
|
|
|
|
+ text: '发送到标签打印机打印',
|
|
|
|
+ value: 1
|
|
|
|
+ }
|
|
|
|
+ ]"
|
|
|
|
+ @change="sendToPeinterFun"
|
|
|
|
+ >
|
|
|
|
+ >
|
|
|
|
+ </uni-data-checkbox>
|
|
|
|
+ <uni-data-checkbox :disabled="sendToPeinter.length === 0" v-model="selectPrinter" :localdata="printers"></uni-data-checkbox>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view style="text-align: center; position: absolute; bottom: 10px; width: 90%; left: 10px; display: flex">
|
|
|
|
+ <button @click="close" style="width: 45%">关闭</button>
|
|
|
|
+ <button @click="printConfirm" :hover-stay-time="500" :loading="subLoading" :disabled="subLoading" class="my-bt-bg" style="width: 45%">打印</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </template>
|
|
|
|
- </uni-popup-dialog>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -169,6 +181,7 @@ export default {
|
|
downloadFile: [],
|
|
downloadFile: [],
|
|
sendToPeinter: [1],
|
|
sendToPeinter: [1],
|
|
selectPrinter: 0,
|
|
selectPrinter: 0,
|
|
|
|
+ subLoading: false,
|
|
focusType: true,
|
|
focusType: true,
|
|
loading,
|
|
loading,
|
|
// 校验表单数据
|
|
// 校验表单数据
|
|
@@ -608,6 +621,9 @@ export default {
|
|
isNotGoods() {
|
|
isNotGoods() {
|
|
this.instockScan(0);
|
|
this.instockScan(0);
|
|
},
|
|
},
|
|
|
|
+ close() {
|
|
|
|
+ this.$refs.printerDialog.close();
|
|
|
|
+ },
|
|
dialogConfirm() {
|
|
dialogConfirm() {
|
|
console.log('点击确认');
|
|
console.log('点击确认');
|
|
this.instockScan(1);
|
|
this.instockScan(1);
|
|
@@ -623,6 +639,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
printConfirm() {
|
|
printConfirm() {
|
|
|
|
+ this.subLoading = true;
|
|
uni.request({
|
|
uni.request({
|
|
url: printWaybillLabelURL,
|
|
url: printWaybillLabelURL,
|
|
method: 'POST',
|
|
method: 'POST',
|
|
@@ -634,6 +651,7 @@ export default {
|
|
printer_code: this.selectPrinter
|
|
printer_code: this.selectPrinter
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
|
+ this.subLoading = false;
|
|
console.log('打印成功', res);
|
|
console.log('打印成功', res);
|
|
}
|
|
}
|
|
});
|
|
});
|