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. 179
      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) { export function splitPackageRecordSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/packagesplit-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }
@ -3025,8 +3025,8 @@ export function splitPackageRecordSubmit(params) {
*/ */
export function mergePackageRecordSubmit(params) { export function mergePackageRecordSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/packagemerge-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }
@ -3037,8 +3037,8 @@ export function mergePackageRecordSubmit(params) {
*/ */
export function overPackageRecordSubmit(params) { export function overPackageRecordSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/packageover-main/create",
method: "put", method: "post",
data: params, 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 v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"
></image> ></image>
</view> </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> </view>
</template> </template>

2
mycomponents/record/recordComDetailCard.vue

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

179
pages/package/record/mergePackageRecord.vue

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

21
pages/package/record/overPackageRecord.vue

@ -84,19 +84,11 @@
data() { data() {
return { return {
id: '', id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, //
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "", toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [], fromlocationTypeList: [],
tolocationTypeList: [], tolocationTypeList: [],
allowModifyLocation: false, 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() { commit() {
if (this.toLocationCode == "") { if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
@ -324,7 +304,6 @@
this.getFromLocationCode(location, code) this.getFromLocationCode(location, code)
}, },
getFromLocationCode(location, code) { getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code; this.fromLocationCode = code;
this.openScanPopup(); this.openScanPopup();
}, },

22
pages/package/record/splitPackageRecord.vue

@ -83,17 +83,9 @@
data() { data() {
return { return {
id: '', id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "", toLocationCode: "",
isShowLocation: false, isShowLocation: false,
fromlocationTypeList: [], 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() { commit() {
if (this.toLocationCode == "") { if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
@ -324,7 +304,6 @@
this.getFromLocationCode(location, code) this.getFromLocationCode(location, code)
}, },
getFromLocationCode(location, code) { getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code; this.fromLocationCode = code;
this.openScanPopup(); this.openScanPopup();
}, },
@ -336,7 +315,6 @@
}) })
return return
} }
this.ToLocationCodeInfo = location;
this.toLocationCode = code; this.toLocationCode = code;
}, },

4
pages/productionReceipt/record/productionReceiptRecord.vue

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

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "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", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save