Browse Source

修改翻包

hella_online_20240829
lijuncheng 6 months ago
parent
commit
74ee9afb34
  1. 18
      src/manifest.json
  2. 7
      src/pages.json
  3. 69
      src/pages/package/job/overPackageJobDetail.vue
  4. 5
      src/pages/setter/index.vue

18
src/manifest.json

@ -25,7 +25,6 @@
"Barcode" : {},
"Camera" : {}
},
/* */
"distribute" : {
/* android */
@ -76,8 +75,23 @@
}
}
}
},
"nativePlugins" : {
"TestModule" : {
"__plugin_info__" : {
"name" : "TestModule",
"description" : "打印",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
}
}
},
/* */
"quickapp" : {},

7
src/pages.json

@ -2037,6 +2037,13 @@
"navigationBarTitleText": "打印",
"enablePullDownRefresh": false
}
},
{
"path": "pages/print/index",
"style": {
"navigationBarTitleText": "打印",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {

69
src/pages/package/job/overPackageJobDetail.vue

@ -329,7 +329,9 @@
overPageSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>",res.data.map(item=>({
let list = [];
res.data.forEach(item => {
list.push({
itemNumber: item.itemCode, //
itemName: item.itemName, //
referenceOrderRow: item.poLine, //
@ -337,9 +339,12 @@
supplierCode: item.supplierCode, //
packageCode: item.number, //
amount: item.qty, //
barcodeString: '', //
barcodeString: item.barcodeString, //
barcodeBase64: ''
})))
})
})
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>", list)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -519,26 +524,58 @@
this.$refs.comMessage.showCommitSuccess();
},
showCommitSuccessMessage(hint,pointData) {
Promise.all(pointData.map(item=>{
return getPackageLabel(item.packageCode)
})).then(res=>{
res.forEach(item=>{
const point = pointData.find(pointItem=>pointItem.packageCode==item.data.list[0].relateNumber)
point.barcodeString = item.data.list[0].barcodeString
})
showCommitSuccessMessage(hint, pointData) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
if(pointData.length>0){
if (pointData.length > 0) {
uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
});
}else{
} else {
navigateBack(1)
}
})
})
// let packageResult = []
// pointData.forEach( async (item) => {
// let res = await getPackageLabel(item.packageCode)
// packageResult.push(res)
// if(packageResult.length==pointData.length){
// packageResult.forEach(item => {
// const point = pointData.find(pointItem => pointItem.packageCode == item.data.list[0]
// .relateNumber)
// point.barcodeString = item.data.list[0].barcodeString
// })
// this.$refs.comMessage.showSuccessMessage(hint, res => {
// if (pointData.length > 0) {
// uni.navigateTo({
// url: `/pages/point/index?points=${JSON.stringify(pointData)}`
// });
// } else {
// navigateBack(1)
// }
// })
// }
// })
// Promise.all(pointData.map(item => {
// return getPackageLabel(item.packageCode)
// })).then(res => {
// res.forEach(item => {
// const point = pointData.find(pointItem => pointItem.packageCode == item.data.list[
// 0].relateNumber)
// point.barcodeString = item.data.list[0].barcodeString
// })
// this.$refs.comMessage.showSuccessMessage(hint, res => {
// if (pointData.length > 0) {
// uni.navigateTo({
// url: `/pages/point/index?points=${JSON.stringify(pointData)}`
// });
// } else {
// navigateBack(1)
// }
// })
// })
},
showRescanMessage(message) {

5
src/pages/setter/index.vue

@ -10,9 +10,10 @@
<u-cell-item v-if="userInfo!=null" icon="file-text" title="部门" :arrow="false">{{userInfo.dept.name}}</u-cell-item>
<u-cell-item v-if="userInfo!=null" icon="photo" title="岗位" :arrow="false">{{(userInfo.posts || []).map(post => post.name).join(',')}}</u-cell-item>
<u-cell-item icon="level" v-if="userInfo!=null" title="角色" :arrow="false">{{(userInfo.roles || []).map(role => role.name).join(',')}}</u-cell-item>
<u-cell-item icon="file-text" title="访问地址" :arrow="false">{{url}}</u-cell-item>
<u-cell-item icon="trash" title="清除缓存" @click="clear()" ></u-cell-item>
<u-cell-item icon="edit-pen" title="修改密码" @click="modifiedPassWord()" ></u-cell-item>
<u-cell-item icon="edit-pen" title="打印" @click="print()" ></u-cell-item>
<!-- <u-cell-item icon="edit-pen" title="打印" @click="print()" ></u-cell-item> -->
<u-cell-item icon="order" title="版本号" :arrow="false">{{version}}</u-cell-item>
<!-- #ifdef APP -->
<u-cell-item icon="reload" title="检查更新" @click="update">{{version}}</u-cell-item>
@ -55,9 +56,11 @@
import {
onLoad
} from "@dcloudio/uni-app";
const app = createApp({});
// app.component({
// });
const url =ref(import.meta.env.VITE_BASE_URL)
const userName = ref(store.state.user.name);
let version = ref();

Loading…
Cancel
Save