niexiting 1 year ago
parent
commit
f507771f1d
  1. 82
      api/request2.js
  2. 68
      common/balance.js
  3. 2
      mycomponents/detail/comDetailCard.vue
  4. 4
      mycomponents/qty/compareQty.vue
  5. 8
      mycomponents/scan/winScanPackAndLocation.vue
  6. 17
      pages/customerReturn/job/returnDetail.vue
  7. 9
      pages/customerReturn/record/returnRecord.vue
  8. 1
      pages/customerReturn/request/customerReturnRequest.vue
  9. 23
      pages/deliver/job/deliverDetail.vue
  10. 1
      pages/inspect/coms/comInspectJobCard.vue
  11. 19
      pages/inspect/job/inspectDetail.vue
  12. 2
      pages/issue/coms/comIssueRequestPopup.vue
  13. 5
      pages/issue/record/issueRecord.vue
  14. 42
      pages/productPutaway/record/productPutawayRecord.vue
  15. 76
      pages/productionReceipt/job/productionReceiptDetail.vue
  16. 38
      pages/productionReturn/coms/comReturn.vue
  17. 10
      pages/purchaseReceipt/job/receiptDetail.vue
  18. 4
      pages/purchaseReturn/job/returnDetail.vue
  19. 43
      pages/purchaseReturn/record/returnRecord.vue
  20. 54
      pages/putaway/record/putawayRecord.vue
  21. 31
      pages/repleinsh/job/repleinshDetail.vue
  22. 37
      pages/repleinsh/record/repleinshRecord.vue
  23. 34
      pages/scrap/record/scrapRecord.vue
  24. 36
      pages/unPlanned/record/issueRecord.vue
  25. 37
      pages/unPlanned/record/receiptRecord.vue
  26. 6
      store/modules/user.js

82
api/request2.js

@ -609,7 +609,7 @@ export function getPurchaseReturnRequestDetail(id) {
}
/**
* 采购退货 申请提交
* 采购退货申请 提交
* @param {*} params
*/
export function purchaseReturnRequestSubmit(params) {
@ -929,7 +929,7 @@ export function getProductionReceiptJobDetail(id) {
*/
export function takeProductionReceiptJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id,
url: baseApi + "/wms/productionreceipt-job-main/accept?id=" + id,
method: "put",
data: {},
});
@ -942,7 +942,7 @@ export function takeProductionReceiptJob(id) {
*/
export function cancleTakeProductionReceiptJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/productionreceipt-job-main/abandon?id=" + id,
method: "put",
data: {},
});
@ -955,7 +955,7 @@ export function cancleTakeProductionReceiptJob(id) {
*/
export function productionReceiptJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
url: baseApi + "/wms/productionreceipt-job-main/execute",
method: "put",
data: params,
});
@ -1352,7 +1352,7 @@ export function cancleTakeProductReceiptJob(id) {
}
/**
* 制品收货 提交
* 制品收货任务 提交
* @param {*} params
*/
export function productReceiptJobsubmit( params) {
@ -1363,6 +1363,20 @@ export function productReceiptJobsubmit( params) {
});
}
/**
* 制品收货记录 提交
* @param {*} params
*/
export function productReceiptRecordsubmit( params) {
return request({
url: baseApi + "/wms/productreceipt-record-main/create",
method: "post",
data: params,
});
}
/**
* 制品上架 任务
* status 任务状态
@ -1441,8 +1455,8 @@ export function productPutawayJobSubmit(params) {
*/
export function productPutawayRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
method: "put",
url: baseApi + "/wms/productputaway-record-main/create",
method: "post",
data: params,
});
}
@ -1559,26 +1573,26 @@ export function getDeliverDetail(id) {
}
/**
* 制品发货 任务承接
* 制品发货任务 承接
* @param {*} id
*
*/
export function takeDeliverJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id,
url: baseApi + "/wms/deliver-job-main/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品发货 放弃承接
* 制品发货任务 放弃承接
* @param {*} id
*
*/
export function cancleTakeDeliverJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/deliver-job-main/abandon?id=" + id,
method: "put",
data: {},
});
@ -1590,14 +1604,16 @@ export function cancleTakeDeliverJob(id) {
* @param {*} 任务id
*
*/
export function deliverJobSubmit( params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id,
url: baseApi + "/wms/deliver-job-main/execute",
method: "put",
data: params,
});
}
/**
* 制品发货申请
* 任务状态
@ -1628,19 +1644,19 @@ export function getDeliverRequestDetail(id) {
}
/**
* 制品发货申请 申请提交
* 制品发货申请 提交
* @param {*} params
*/
export function deliverRequestSubmit(params) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put",
url: baseApi + "/wms/deliver-request-main/create",
method: "post",
data: params,
});
}
/**
* 制品发货 记录提交
* 制品发货记录 提交
* @param {*} params
*/
export function deliverRecordSubmit(params) {
@ -1682,39 +1698,39 @@ export function getCustomerReturnJobDetail(id) {
/**
* 客户退货 任务承接
* 客户退货任务 承接
* @param {*} id
*
*/
export function takeCustomerReturnJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id,
url: baseApi + "/wms/customerreturn-job-main/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 客户退货 放弃承接
* 客户退货任务 放弃承接
* @param {*} id
*
*/
export function cancleTakeCustomerReturnJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/customerreturn-job-main/abandon?id=" + id,
method: "put",
data: {},
});
}
/**
* 客户退货 任务提交
* 客户退货任务 提交
* @param {*} 任务id
*
*/
export function customerReturnJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
url: baseApi + "/wms/customerreturn-job-main/execute",
method: "put",
data: params,
});
@ -1753,13 +1769,13 @@ export function getCustomerReturnRequestDetail(id) {
/**
* 客户退货 申请提交
* 客户退货申请 提交
* @param {*} params
*/
export function customerReturnRequestSubmit(params) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put",
url: baseApi + "/wms/customerreturn-request-main/create",
method: "post",
data: params,
});
}
@ -1971,13 +1987,13 @@ export function getProductPutawayRequestDetail(id) {
}
/**
* 制品上架 申请提交
* 制品上架申请 提交
* @param {*} params
*/
export function productPutawayRequestSubmit(params) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put",
url: baseApi + "/wms/productputaway-request-main/create",
method: "post",
data: params,
});
}
@ -2095,7 +2111,7 @@ export function cancleTakeProductionReturnJob(id) {
*/
export function productionReturnJobSubmit( params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id,
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
method: "put",
data: params,
});
@ -2387,20 +2403,20 @@ export function getRepleinshJobDetail(id) {
*/
export function takeRepleinshJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id,
url: baseApi + "/wms/repleinsh-job-main/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 补料 放弃承接
* 补料任务 放弃承接
* @param {*} id
*
*/
export function cancleTakeRepleinshJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/repleinsh-job-main/abandon?id=" + id,
method: "put",
data: {},
});
@ -2412,7 +2428,7 @@ export function cancleTakeRepleinshJob(id) {
*/
export function repleinshJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
url: baseApi + "/wms/repleinsh-job-main/execute",
method: "put",
data: params,
});

68
common/balance.js

@ -38,7 +38,7 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
})
}
export function getBalanceByManagementPrecision(label, locationCode, callback) {
export function getBalanceByManagementPrecision(label, locationCode,fromInventoryStatuses, callback) {
let result = {
list: [],
success: true,
@ -53,25 +53,25 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) {
let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) {
case 'BY_PACKAGING':
byPacking(label, locationCode, res => {
byPacking(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_BATCH':
byBatch(label, locationCode, res => {
byBatch(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_QUANTITY':
byQuantity(label, locationCode, res => {
byQuantity(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_UNIQUEID':
byUniqueId(label, res => {
byUniqueId(label,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
@ -90,7 +90,7 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byPacking(label, locationCode, callback) {
export function byPacking(label, locationCode,fromInventoryStatuses, callback) {
let result = {
success: true,
message: '',
@ -98,12 +98,12 @@ export function byPacking(label, locationCode, callback) {
};
var filters = []
filters.push({
column: "packing_number",
column: "packingNumber",
action: "==",
value: label.packingNumber
})
filters.push({
column: "item_code",
column: "itemCode",
action: "==",
value: label.itemCode
})
@ -113,10 +113,18 @@ export function byPacking(label, locationCode, callback) {
value: label.batch
})
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
@ -149,10 +157,10 @@ export function byPacking(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byBatch(label, locationCode, callback) {
export function byBatch(label, locationCode,fromInventoryStatuses, callback) {
var filters = []
filters.push({
column: "item_code",
column: "itemCode",
action: "==",
value: label.itemCode
})
@ -162,11 +170,19 @@ export function byBatch(label, locationCode, callback) {
value: label.batch
})
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
pageNo: 1,
@ -202,7 +218,7 @@ export function byBatch(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byQuantity(label, locationCode, callback) {
export function byQuantity(label, locationCode,fromInventoryStatuses, callback) {
let result = {
success: true,
message: '',
@ -211,16 +227,24 @@ export function byQuantity(label, locationCode, callback) {
var filters = []
filters.push({
column: "item_code",
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
pageNo: 1,
@ -250,7 +274,7 @@ export function byQuantity(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byUniqueId(label, locationCode, callback) {
export function byUniqueId(label, locationCode,fromInventoryStatuses, callback) {
let param = {
packingNumber: label.packingNumber
};
@ -262,11 +286,19 @@ export function byUniqueId(label, locationCode, callback) {
var filters = []
filters.push({
column: "packing_number",
column: "packingNumber",
action: "==",
value: label.packingNumber
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
pageNo: 1,
@ -305,7 +337,7 @@ export function balanceByLocation(locationCode, callback) {
var filters = []
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})

2
mycomponents/detail/comDetailCard.vue

@ -11,7 +11,7 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowToLocation="settingParam.allowModifyLocation=='TRUE'">
<recommend :detail="item" :isShowToLocation="false">
</recommend>
</uni-swipe-action-item>
</uni-swipe-action>

4
mycomponents/qty/compareQty.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-row ">
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view v-if="Number(handleQty)>0">
<view >
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">
{{Number(handleQty)}}
</view>
@ -14,7 +14,7 @@
{{Number(handleQty)}}
</view>
</view>
<view v-if="Number(handleQty)>0" class="std_split">/</view>
<view class="std_split">/</view>
<view class="text_recommend center">
{{Number(recommendQty)}}
</view>

8
mycomponents/scan/winScanPackAndLocation.vue

@ -96,7 +96,8 @@
locationOnFocus: false,
businessType: {},
inventoryStatus: [],
managementPrecision: ''
managementPrecision: '',
fromInventoryStatuses:""
}
},
created() {
@ -135,7 +136,8 @@
}
}
this.$refs.popup.open('bottom');
this.inventoryStatus = []; //
this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
},
@ -201,7 +203,7 @@
} else {
if (result.label != null) {
this.scanResult = result;
getBalanceByManagementPrecision(result.label,this.fromLocationCode,res=>{
getBalanceByManagementPrecision(result.label,this.fromLocationCode,this.fromInventoryStatuses,res=>{
if(res.success){
this.managementPrecision =res.managementPrecision
this.afterQueryBalance(res.data.list);

17
pages/customerReturn/job/returnDetail.vue

@ -100,15 +100,14 @@
this.id = option.id;
if (this.id != undefined) {
//
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//

9
pages/customerReturn/record/returnRecord.vue

@ -120,10 +120,13 @@
},
onLoad(option) {
this.fromType = option.fromType
if(this.fromType=="requestType"){ updateTitle("客户退货申请")
this.showToLoaction = false; }else { updateTitle("客户退货记录")
if(this.fromType=="requestType"){
var typeCode = "CustomerreturnRequest" updateTitle("客户退货申请")
this.showToLoaction = false; }else {
var typeCode = "CustomerreturnRecord"
updateTitle("客户退货记录")
this.showToLoaction = true; }
var typeCode = "Customerreturn"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;

1
pages/customerReturn/request/customerReturnRequest.vue

@ -16,6 +16,7 @@
<uni-load-more :status="loadingType" v-if="requestList.length>0" />
<request-info-popup ref='requestInfoPopup'></request-info-popup>
</view>
<requestButton @goScan='openScanDetailPopup'></requestButton>
<comMessage ref="comMessage"></comMessage>
</view>
</template>

23
pages/deliver/job/deliverDetail.vue

@ -104,18 +104,17 @@
},
onLoad(option) {
this.id = option.id;
// if (this.id != undefined) {
// //
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
// }
this.getDetail();
if (this.id != undefined) {
//
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
onNavigationBarButtonTap(e) {

1
pages/inspect/coms/comInspectJobCard.vue

@ -37,7 +37,6 @@
methods: {
getInspectType(value){
console.log("返回1",getInspectType(value))
return getInspectType(value)
}

19
pages/inspect/job/inspectDetail.vue

@ -45,7 +45,7 @@
} from '@/common/basic.js';
import {
getInventoryStatusName,
getDirectoryItemArray
} from '@/common/directory.js';
import {
@ -84,14 +84,13 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
toLocationInfo: {},
businessTypeInfo: {},
locationTypeList: [],
fromInventoryStatuses :"",
managementList: [],
selectedItem: {},
failedQty: 0,
crackQty: 0,
inspectType: ""
inspectType: "",
};
},
onLoad(option) {
@ -195,6 +194,9 @@
res.photos = ""
res.inspectResult = ""
})
// that.jobContent.outInventoryStatuses='INSP,OK'
that.jobContent.outInventoryStatuses='HOLD'
that.fromInventoryStatuses = that.jobContent.outInventoryStatuses
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
@ -380,15 +382,6 @@
})
},
getLocationInfo(locationCode) {
getBasicLocationByCode(locationCode).then(res => {
if (res.data.list.length > 0) {
this.toLocationInfo = res.data.list[0]
}
})
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {

2
pages/issue/coms/comIssueRequestPopup.vue

@ -191,7 +191,7 @@
openRequestPopup(editPosition) {
if(this.positionList.length==0){
getWorkShopLineStation().then(res=>{
this.positionList =res
this.positionList = res.data
}).catch(error=>{
})

5
pages/issue/record/issueRecord.vue

@ -17,9 +17,6 @@
</view>
</view>
</div>
<com-scan-issue-pack ref="comScanIssuePack">
</com-scan-issue-pack>
<comMessage ref="comMessage"></comMessage>
</view>
</view>
@ -46,7 +43,6 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comIssueRequestPopup from '@/pages/issue/coms/comIssueRequestPopup.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue'
@ -56,7 +52,6 @@
comBlankView,
comIssueRequestPopup,
jobDetailPopup,
comScanIssuePack,
comMessage,
comIssueRequestCreator
},

42
pages/productPutaway/record/productPutawayRecord.vue

@ -9,7 +9,7 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
@ -98,7 +98,7 @@
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
dataContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
@ -268,7 +268,7 @@
if(this.fromType=="requestType"){
var params = this.setParams(false)
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params))
// productPutawayRequestSubmit(params).then(res => {
// uni.hideLoading()
@ -291,7 +291,7 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams(true)
var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params));
// productPutawayRecordSubmit(params).then(res => {
@ -314,7 +314,33 @@
},
setParams(queryModel) {
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
setRecordParams(queryModel) {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -342,9 +368,9 @@
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
this.dataContent.subList = subList
this.dataContent.creator = creator;
return this.dataContent;
},

76
pages/productionReceipt/job/productionReceiptDetail.vue

@ -95,7 +95,6 @@
managementList: [],
fromLocationCode: "",
toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [],
};
},
@ -103,15 +102,14 @@
this.id = option.id;
if (this.id != undefined) {
//
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
@ -173,7 +171,6 @@
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode);
updateTitle(this.jobContent.number);
} else {
that.showMessage('列表数据为0');
@ -185,16 +182,6 @@
})
},
getLocationInfo(locationCode) {
if (locationCode != '') {
getBasicLocationByCode(locationCode).then(res => {
if (res.data.list.length > 0) {
this.toLocationInfo = res.data.list[0]
}
})
}
},
calcHandleQty() {
calcHandleQty(this.detailSource);
this.continueScan()
@ -247,6 +234,7 @@
getScanResult(result) {
try {
var supplierCode =result.package.supplierCode
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var qty = result.balance.qty;
@ -278,7 +266,14 @@
']不一致,是否继续上架?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.supplierCode =supplierCode
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
@ -286,7 +281,14 @@
});
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.supplierCode = supplierCode
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
}
}
@ -376,23 +378,24 @@
var params = this.setParams()
console.log("提交参数",JSON.stringify(params));
// productionReceiptJobSubmit(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)
// })
productionReceiptJobSubmit(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 {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
@ -402,8 +405,11 @@
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber =info.packingNumber;
detail.toPackingNumber = info.packingNumber;
detail.toBatch =info.batch;
detail.toContainerNumber = "";
detail.toLocationCode =this.toLocationCode;
subList.push(detail)
}
})

38
pages/productionReturn/coms/comReturn.vue

@ -8,7 +8,7 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :settingParam="jobContent"
<record-com-detail-card :dataContent="item" :settingParam="dataContent"
@removeData="removeData" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
@ -119,7 +119,7 @@
return {
id: '',
scanCount: 0,
jobContent: {}, //
dataContent: {}, //
subList: [], //subList
detailSource: [], //
fromLocationInfo: {},
@ -285,7 +285,7 @@
});
if(this.fromType=="requestType"){
var params = this.setParams(false)
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params))
// productionReturnRequestSubmit(params).then(res => {
// uni.hideLoading()
@ -331,6 +331,32 @@
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
setParams(queryModel) {
var subList = []
var creator = this.$store.state.user.id
@ -359,9 +385,9 @@
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
this.dataContent.subList = subList
this.dataContent.creator = creator;
return this.dataContent;
},

10
pages/purchaseReceipt/job/receiptDetail.vue

@ -5,7 +5,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" :locationTypeList='locationTypeList'>
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
</com-receipt-detail-card>
</view>
<u-line />
@ -19,7 +19,7 @@
<view class="">
<required-location ref="requiredLocation" title="默认收货库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="locationTypeList"></required-location>
:locationTypeList="toLocationTypeList"></required-location>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -89,7 +89,7 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationTypeList: [],
toLocationCode: '',
toLocationInfo: {},
businessTypeInfo: {},
@ -173,8 +173,8 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
// that.jobContent.locationTypeList = that.locationTypeList;
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
// that.jobContent.toLocationTypeList = that.toLocationTypeList;
that.subList = res.data.subList;
this.toLocationCode = that.subList[0].toLocationCode
that.detailSource = getDataSource(that.subList)

4
pages/purchaseReturn/job/returnDetail.vue

@ -249,6 +249,7 @@
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
@ -262,6 +263,7 @@
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
@ -338,7 +340,7 @@
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch;
detail.toInventoryStatus = detail.inventoryStatus;
detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}

43
pages/purchaseReturn/record/returnRecord.vue

@ -87,7 +87,8 @@
tolocationTypeList: [],
businessType: {}, //
poNumber: '',
fromType: ""
fromType: "",
dataContent : {}
};
},
@ -219,10 +220,10 @@
});
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
if (this.fromType == "requestType") {
var params = this.setParams(false)
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// purchaseReturnRequestSubmit(params).then(res => {
// uni.hideLoading()
@ -246,7 +247,7 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams(true)
var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params));
// purchaseReturnRecordSubmit(params).then(res => {
@ -274,7 +275,7 @@
},
setParams(queryModel) {
setRecordParams(queryModel) {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -300,9 +301,35 @@
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
this.dataContent.subList = subList
this.dataContent.creator = creator;
return this.dataContent;
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
showMessage(message) {

54
pages/putaway/record/putawayRecord.vue

@ -8,7 +8,7 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
@ -98,7 +98,7 @@
id: '',
receiptJob: {},
received: false,
jobContent: {}, //
dataContent: {}, //
detailSource: [], //
locationTypeList: [],
businessTypeInfo: {},
@ -260,7 +260,7 @@
});
if (this.fromType == "requestType") {
var params = this.setParams(false)
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params))
// putawayRequestSubmit(params).then(res => {
// uni.hideLoading()
@ -283,7 +283,7 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams(true)
var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params));
// putawayRecordSubmit(params).then(res => {
@ -305,14 +305,12 @@
}
},
setParams(queryModel) {
setRecordParams(queryModel) {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var subItem = {};
// Object.assign(subItem, detail)
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
@ -322,20 +320,46 @@
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
} else {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
// detail.toPackingNumber = detail.packingNumber;
// detail.toContainerNumber = detail.containerNumber
// detail.toBatch = detail.toBatch;
// detail.toInventoryStatus = detail.inventoryStatus
// detail.toLocationCode = ""
}
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
this.dataContent.subList = subList
this.dataContent.creator = creator;
return this.dataContent;
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},

31
pages/repleinsh/job/repleinshDetail.vue

@ -91,7 +91,6 @@
managementList: [],
fromLocationCode: "",
toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [],
};
},
@ -99,15 +98,14 @@
this.id = option.id;
if (this.id != undefined) {
//
// if (option.status == "JOB_PENDING") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
@ -174,7 +172,6 @@
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
} else {
that.showMessage('列表数据为0');
@ -186,16 +183,6 @@
})
},
getLocationInfo(locationCode) {
if (locationCode != '') {
getBasicLocationByCode(locationCode).then(res => {
if (res.data.list.length > 0) {
this.toLocationInfo = res.data.list[0]
}
})
}
},
calcScanCount(closeScan) {
let items = this.subList.filter(r => {
if (r.scaned) {
@ -286,6 +273,7 @@
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
@ -299,6 +287,7 @@
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance.qty) ? Number(
result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty

37
pages/repleinsh/record/repleinshRecord.vue

@ -8,7 +8,7 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
@ -97,7 +97,7 @@
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
dataContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
@ -256,9 +256,12 @@
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// repleinshRequestSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
@ -303,6 +306,32 @@
return subList;
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}

34
pages/scrap/record/scrapRecord.vue

@ -17,7 +17,7 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
</record-com-detail-card>
@ -99,7 +99,7 @@
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
dataContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
@ -263,10 +263,10 @@
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// scrapRequestSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
@ -310,6 +310,32 @@
return subList;
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {

36
pages/unPlanned/record/issueRecord.vue

@ -102,7 +102,8 @@
detailSource: [], //
reason: "",
reasonList: [],
fromType: ""
fromType: "",
dataContent:{}
}
},
@ -222,9 +223,12 @@
this.showErrorMessage("请选择出库原因")
return;
}
var params = this.setParams();
console.log("提交参数",JSON.stringify(params));
if(this.fromType=="requestType"){
var params = this.setRequestParams();
console.log("提交参数",JSON.stringify(params));
// unPlannedIssueRequestSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
@ -266,6 +270,32 @@
})
return subList;
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
}
}
</script>

37
pages/unPlanned/record/receiptRecord.vue

@ -100,7 +100,8 @@
reason: "",
reasonList: [],
fromType: "",
showToLoaction:true
showToLoaction:true,
dataContent:{}
}
},
@ -249,7 +250,7 @@
}
if(this.fromType=="requestType"){
var params = this.setParams(false)
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params))
// unPlannedReceiptRequestbSubmit(params).then(res => {
// uni.hideLoading()
@ -322,9 +323,35 @@
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
this.dataContent.subList = subList
this.dataContent.creator = creator;
return this.dataContent;
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
},
}

6
store/modules/user.js

@ -97,9 +97,9 @@ const user = {
resolve(res)
}).catch(error => {
reject(error)
uni.showToast({
title:"用户信息获取失败"
})
// uni.showToast({
// title:"用户信息获取失败"
// })
})
})
},

Loading…
Cancel
Save