Commit cf59893b by LJM

香港wms-理货确认-打印标签

parent 7f901591
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter" @click="submit()" :class="{ disabled: disabled }">确认提交</view> <view class="btn row rowCenter verCenter" @click="submit()" :class="{ disabled: disabled }">确认提交</view>
<view class="btn row rowCenter verCenter" style="margin-top: 12rpx;background-color: #f00;" @click="submit(1)" :class="{ disabled: disabled }">确认提交并打印</view>
</view> </view>
</template> </template>
...@@ -456,9 +457,10 @@ ...@@ -456,9 +457,10 @@
this.form.customs_clearance_price = index; this.form.customs_clearance_price = index;
}, },
/** /**
* @param {Object} type 1提交并打印
* 提交 * 提交
*/ */
submit() { submit(type) {
if (!this.form.erp_order_sn) { if (!this.form.erp_order_sn) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
...@@ -524,11 +526,18 @@ ...@@ -524,11 +526,18 @@
showCancel: false, showCancel: false,
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
setTimeout(() => { if (type == 1) {
uni.navigateBack({ //点击【确认提交并打印】跳转至【打印标签】页面
delta: 1 uni.navigateTo({
}); url: '/pages/tag/print?board_num=' + this.form.board_num + '&box_num=' + this.form.box_num + '&erp_order_sn=' + this.form.erp_order_sn
}, 2000); })
} else {
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 2000);
}
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
......
...@@ -86,7 +86,6 @@ const debounce = (fn, wait) => { ...@@ -86,7 +86,6 @@ const debounce = (fn, wait) => {
} }
} }
/** /**
* 来创建指定长度且所有元素都被初始化为 false 的数组 * 来创建指定长度且所有元素都被初始化为 false 的数组
*/ */
...@@ -94,11 +93,21 @@ const createArray = (length, value) => { ...@@ -94,11 +93,21 @@ const createArray = (length, value) => {
return Array(length).fill(value); return Array(length).fill(value);
} }
/**
* 数组内找出对于的索引
*/
const findIndexOrZero = (arr, value) => {
var index = arr.indexOf(value);
return index !== -1 ? index : 0;
}
module.exports = { module.exports = {
request, request,
getPlatform, getPlatform,
titleCase, titleCase,
debounce, debounce,
createArray createArray,
findIndexOrZero
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment