Browse Source

修改合包

wms3.0_pda
lijuncheng 11 months ago
parent
commit
72ace77d81
  1. 12
      api/request2.js
  2. 2
      mycomponents/package/packageTarget.vue
  3. 2
      mycomponents/record/recordComDetailCard.vue
  4. 191
      pages/package/record/mergePackageRecord.vue
  5. 21
      pages/package/record/overPackageRecord.vue
  6. 22
      pages/package/record/splitPackageRecord.vue
  7. 4
      pages/productionReceipt/record/productionReceiptRecord.vue
  8. 2
      static/config.json

12
api/request2.js

@ -3013,8 +3013,8 @@ export function unbindPalledtRecordSubmit(params) {
*/
export function splitPackageRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "put",
url: baseApi + "/wms/packagesplit-main/create",
method: "post",
data: params,
});
}
@ -3025,8 +3025,8 @@ export function splitPackageRecordSubmit(params) {
*/
export function mergePackageRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "put",
url: baseApi + "/wms/packagemerge-main/create",
method: "post",
data: params,
});
}
@ -3037,8 +3037,8 @@ export function mergePackageRecordSubmit(params) {
*/
export function overPackageRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "put",
url: baseApi + "/wms/packageover-main/create",
method: "post",
data: params,
});
}

2
mycomponents/package/packageTarget.vue

@ -11,7 +11,7 @@
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"
></image>
</view>
<win-scan-pack ref="scanPopup" @getResultult='getScanResult' headerType="HPQ"></win-scan-pack>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ"></win-scan-pack>
</view>
</template>

2
mycomponents/record/recordComDetailCard.vue

@ -19,6 +19,7 @@
:isShowPack="true" :isShowLocation="isShowLocation"></balance>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line />
</view>
</uni-collapse-item>
</uni-collapse>
@ -85,7 +86,6 @@
watch: {
dataContent: {
handler(newName, oldName) {
debugger;
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {

191
pages/package/record/mergePackageRecord.vue

@ -18,14 +18,12 @@
</scroll-view>
</view>
<packageTarget title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber"
@getScanResult='getToPackingNumber'></packageTarget>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<packageTarget title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber"
@getScanResult='getToPackingNumber'></packageTarget>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -35,7 +33,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
@ -44,6 +42,9 @@
</template>
<script>
import {
mergePackageRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
@ -87,27 +88,21 @@
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
toPackingNumber: ""
toPackingNumber: "",
toBatch:"",
currentItemCode: "",
dataContent: {}
};
},
onLoad(option) {
@ -151,9 +146,15 @@
}
})
if (item == undefined) {
if (this.currentItemCode != "" && this.currentItemCode != balance.itemCode) {
this.showErrorMessage("合包当前零件号[" + this.currentItemCode + "与扫描零件号[" + balance.itemCode +
"]不一致,请扫描相同零件号")
return;
}
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.currentItemCode = balance.itemCode;
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
@ -231,106 +232,63 @@
}
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
mergePackageRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
this.showErrorMessage("没有要扫描的数据")
}
//
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: "",
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
ReceiptDock: this.jobContent.ReceiptDock,
carrierCode: this.jobContent.carrierCode,
TransferMode: this.jobContent.TransferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.toLocationInfo.WarehouseCode,
toWarehouseCode: this.toLocationInfo.WarehouseCode,
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, //
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
Remark: this.jobContent.Remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
subList: [
],
}
this.detailSource.forEach(res => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.subList.push(res1.record)
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.fromInventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = detail.fromPackingNumber;
detail.toPackingNumber = this.toPackingNumber;
detail.fromBatch = detail.batch;
detail.toBatch = detail.batch;
detail.fromLocationCode = detail.locationCode;
// detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
})
})
return params;
this.dataContent.subList = subList;
this.dataContent.creator = creator;
return this.dataContent;
},
showMessage(message) {
@ -361,25 +319,17 @@
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
duration: 2000
})
return
}
this.ToLocationCodeInfo = location;
this.toLocationCode = code;
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.toPackingNumber =""
this.toBatch =""
this.currentItemCode =""
this.dataContent ={}
})
},
@ -394,7 +344,14 @@
}
},
getToPackingNumber(result) {
if(this.currentItemCode!=result.label.itemCode){
this.showErrorMessage("合包当前零件号[" + this.currentItemCode + "与目标零件号[" + result.label.itemCode +
"]不一致,请扫描相同零件号")
return;
}
this.toPackingNumber = result.label.packingNumber;
this.toBatch =result.label.batch
}
}
}

21
pages/package/record/overPackageRecord.vue

@ -84,19 +84,11 @@
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
@ -255,18 +247,6 @@
}
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
@ -324,7 +304,6 @@
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},

22
pages/package/record/splitPackageRecord.vue

@ -83,17 +83,9 @@
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
@ -255,18 +247,6 @@
}
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
@ -324,7 +304,6 @@
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
@ -336,7 +315,6 @@
})
return
}
this.ToLocationCodeInfo = location;
this.toLocationCode = code;
},

4
pages/productionReceipt/record/productionReceiptRecord.vue

@ -90,11 +90,8 @@
jobContent: {}, //
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
@ -300,7 +297,6 @@
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},

2
static/config.json

@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
"value": "http://dev.ccwin-in.com:25100/api/admin-api",
"value": "http://192.168.0.230:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save