聂喜婷 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 * @param {*} params
*/ */
export function purchaseReturnRequestSubmit(params) { export function purchaseReturnRequestSubmit(params) {
@ -929,7 +929,7 @@ export function getProductionReceiptJobDetail(id) {
*/ */
export function takeProductionReceiptJob(id) { export function takeProductionReceiptJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id, url: baseApi + "/wms/productionreceipt-job-main/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -942,7 +942,7 @@ export function takeProductionReceiptJob(id) {
*/ */
export function cancleTakeProductionReceiptJob(id) { export function cancleTakeProductionReceiptJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/productionreceipt-job-main/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -955,7 +955,7 @@ export function cancleTakeProductionReceiptJob(id) {
*/ */
export function productionReceiptJobSubmit(params) { export function productionReceiptJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/productionreceipt-job-main/execute",
method: "put", method: "put",
data: params, data: params,
}); });
@ -1352,7 +1352,7 @@ export function cancleTakeProductReceiptJob(id) {
} }
/** /**
* 制品收货 提交 * 制品收货任务 提交
* @param {*} params * @param {*} params
*/ */
export function productReceiptJobsubmit( 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 任务状态 * status 任务状态
@ -1441,8 +1455,8 @@ export function productPutawayJobSubmit(params) {
*/ */
export function productPutawayRecordSubmit(params) { export function productPutawayRecordSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", url: baseApi + "/wms/productputaway-record-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }
@ -1559,26 +1573,26 @@ export function getDeliverDetail(id) {
} }
/** /**
* 制品发货 任务承接 * 制品发货任务 承接
* @param {*} id * @param {*} id
* *
*/ */
export function takeDeliverJob(id) { export function takeDeliverJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id, url: baseApi + "/wms/deliver-job-main/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
} }
/** /**
* 制品发货 放弃承接 * 制品发货任务 放弃承接
* @param {*} id * @param {*} id
* *
*/ */
export function cancleTakeDeliverJob(id) { export function cancleTakeDeliverJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/deliver-job-main/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -1590,14 +1604,16 @@ export function cancleTakeDeliverJob(id) {
* @param {*} 任务id * @param {*} 任务id
* *
*/ */
export function deliverJobSubmit( params) { export function deliverJobSubmit( params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, url: baseApi + "/wms/deliver-job-main/execute",
method: "put", method: "put",
data: params, data: params,
}); });
} }
/** /**
* 制品发货申请 * 制品发货申请
* 任务状态 * 任务状态
@ -1628,19 +1644,19 @@ export function getDeliverRequestDetail(id) {
} }
/** /**
* 制品发货申请 申请提交 * 制品发货申请 提交
* @param {*} params * @param {*} params
*/ */
export function deliverRequestSubmit(params) { export function deliverRequestSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/submit", url: baseApi + "/wms/deliver-request-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }
/** /**
* 制品发货 记录提交 * 制品发货记录 提交
* @param {*} params * @param {*} params
*/ */
export function deliverRecordSubmit(params) { export function deliverRecordSubmit(params) {
@ -1682,39 +1698,39 @@ export function getCustomerReturnJobDetail(id) {
/** /**
* 客户退货 任务承接 * 客户退货任务 承接
* @param {*} id * @param {*} id
* *
*/ */
export function takeCustomerReturnJob(id) { export function takeCustomerReturnJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id, url: baseApi + "/wms/customerreturn-job-main/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
} }
/** /**
* 客户退货 放弃承接 * 客户退货任务 放弃承接
* @param {*} id * @param {*} id
* *
*/ */
export function cancleTakeCustomerReturnJob(id) { export function cancleTakeCustomerReturnJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/customerreturn-job-main/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
} }
/** /**
* 客户退货 任务提交 * 客户退货任务 提交
* @param {*} 任务id * @param {*} 任务id
* *
*/ */
export function customerReturnJobSubmit(params) { export function customerReturnJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit", url: baseApi + "/wms/customerreturn-job-main/execute",
method: "put", method: "put",
data: params, data: params,
}); });
@ -1753,13 +1769,13 @@ export function getCustomerReturnRequestDetail(id) {
/** /**
* 客户退货 申请提交 * 客户退货申请 提交
* @param {*} params * @param {*} params
*/ */
export function customerReturnRequestSubmit(params) { export function customerReturnRequestSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/submit", url: baseApi + "/wms/customerreturn-request-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }
@ -1971,13 +1987,13 @@ export function getProductPutawayRequestDetail(id) {
} }
/** /**
* 制品上架 申请提交 * 制品上架申请 提交
* @param {*} params * @param {*} params
*/ */
export function productPutawayRequestSubmit(params) { export function productPutawayRequestSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/submit", url: baseApi + "/wms/productputaway-request-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }
@ -2095,7 +2111,7 @@ export function cancleTakeProductionReturnJob(id) {
*/ */
export function productionReturnJobSubmit( params) { export function productionReturnJobSubmit( params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id, url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
method: "put", method: "put",
data: params, data: params,
}); });
@ -2387,20 +2403,20 @@ export function getRepleinshJobDetail(id) {
*/ */
export function takeRepleinshJob(id) { export function takeRepleinshJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/accept?id=" + id, url: baseApi + "/wms/repleinsh-job-main/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
} }
/** /**
* 补料 放弃承接 * 补料任务 放弃承接
* @param {*} id * @param {*} id
* *
*/ */
export function cancleTakeRepleinshJob(id) { export function cancleTakeRepleinshJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/repleinsh-job-main/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -2412,7 +2428,7 @@ export function cancleTakeRepleinshJob(id) {
*/ */
export function repleinshJobSubmit(params) { export function repleinshJobSubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", url: baseApi + "/wms/repleinsh-job-main/execute",
method: "put", method: "put",
data: params, 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 = { let result = {
list: [], list: [],
success: true, success: true,
@ -53,25 +53,25 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) {
let managementPrecision = res.data[0].ManagementPrecision; let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) { switch (managementPrecision) {
case 'BY_PACKAGING': case 'BY_PACKAGING':
byPacking(label, locationCode, res => { byPacking(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision; res.managementPrecision = managementPrecision;
callback(res); callback(res);
}); });
break; break;
case 'BY_BATCH': case 'BY_BATCH':
byBatch(label, locationCode, res => { byBatch(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision; res.managementPrecision = managementPrecision;
callback(res); callback(res);
}); });
break; break;
case 'BY_QUANTITY': case 'BY_QUANTITY':
byQuantity(label, locationCode, res => { byQuantity(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision; res.managementPrecision = managementPrecision;
callback(res); callback(res);
}); });
break; break;
case 'BY_UNIQUEID': case 'BY_UNIQUEID':
byUniqueId(label, res => { byUniqueId(label,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision; res.managementPrecision = managementPrecision;
callback(res); callback(res);
}); });
@ -90,7 +90,7 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) {
* @param {Object} locationCode * @param {Object} locationCode
* @param {Object} callback * @param {Object} callback
*/ */
export function byPacking(label, locationCode, callback) { export function byPacking(label, locationCode,fromInventoryStatuses, callback) {
let result = { let result = {
success: true, success: true,
message: '', message: '',
@ -98,12 +98,12 @@ export function byPacking(label, locationCode, callback) {
}; };
var filters = [] var filters = []
filters.push({ filters.push({
column: "packing_number", column: "packingNumber",
action: "==", action: "==",
value: label.packingNumber value: label.packingNumber
}) })
filters.push({ filters.push({
column: "item_code", column: "itemCode",
action: "==", action: "==",
value: label.itemCode value: label.itemCode
}) })
@ -113,10 +113,18 @@ export function byPacking(label, locationCode, callback) {
value: label.batch value: label.batch
}) })
filters.push({ filters.push({
column: "location_code", column: "locationCode",
action: "==", action: "==",
value: locationCode value: locationCode
}) })
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = { var params = {
filters: filters, filters: filters,
@ -149,10 +157,10 @@ export function byPacking(label, locationCode, callback) {
* @param {Object} locationCode * @param {Object} locationCode
* @param {Object} callback * @param {Object} callback
*/ */
export function byBatch(label, locationCode, callback) { export function byBatch(label, locationCode,fromInventoryStatuses, callback) {
var filters = [] var filters = []
filters.push({ filters.push({
column: "item_code", column: "itemCode",
action: "==", action: "==",
value: label.itemCode value: label.itemCode
}) })
@ -162,10 +170,18 @@ export function byBatch(label, locationCode, callback) {
value: label.batch value: label.batch
}) })
filters.push({ filters.push({
column: "location_code", column: "locationCode",
action: "==", action: "==",
value: locationCode value: locationCode
}) })
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = { var params = {
filters: filters, filters: filters,
@ -202,7 +218,7 @@ export function byBatch(label, locationCode, callback) {
* @param {Object} locationCode * @param {Object} locationCode
* @param {Object} callback * @param {Object} callback
*/ */
export function byQuantity(label, locationCode, callback) { export function byQuantity(label, locationCode,fromInventoryStatuses, callback) {
let result = { let result = {
success: true, success: true,
message: '', message: '',
@ -211,15 +227,23 @@ export function byQuantity(label, locationCode, callback) {
var filters = [] var filters = []
filters.push({ filters.push({
column: "item_code", column: "itemCode",
action: "==", action: "==",
value: label.itemCode value: label.itemCode
}) })
filters.push({ filters.push({
column: "location_code", column: "locationCode",
action: "==", action: "==",
value: locationCode value: locationCode
}) })
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = { var params = {
filters: filters, filters: filters,
@ -250,7 +274,7 @@ export function byQuantity(label, locationCode, callback) {
* @param {Object} locationCode * @param {Object} locationCode
* @param {Object} callback * @param {Object} callback
*/ */
export function byUniqueId(label, locationCode, callback) { export function byUniqueId(label, locationCode,fromInventoryStatuses, callback) {
let param = { let param = {
packingNumber: label.packingNumber packingNumber: label.packingNumber
}; };
@ -262,10 +286,18 @@ export function byUniqueId(label, locationCode, callback) {
var filters = [] var filters = []
filters.push({ filters.push({
column: "packing_number", column: "packingNumber",
action: "==", action: "==",
value: label.packingNumber value: label.packingNumber
}) })
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = { var params = {
filters: filters, filters: filters,
@ -305,7 +337,7 @@ export function balanceByLocation(locationCode, callback) {
var filters = [] var filters = []
filters.push({ filters.push({
column: "location_code", column: "locationCode",
action: "==", action: "==",
value: locationCode value: locationCode
}) })

2
mycomponents/detail/comDetailCard.vue

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

4
mycomponents/qty/compareQty.vue

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

8
mycomponents/scan/winScanPackAndLocation.vue

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

17
pages/customerReturn/job/returnDetail.vue

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

9
pages/customerReturn/record/returnRecord.vue

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

1
pages/customerReturn/request/customerReturnRequest.vue

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

23
pages/deliver/job/deliverDetail.vue

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

1
pages/inspect/coms/comInspectJobCard.vue

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

19
pages/inspect/job/inspectDetail.vue

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

2
pages/issue/coms/comIssueRequestPopup.vue

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

5
pages/issue/record/issueRecord.vue

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

42
pages/productPutaway/record/productPutawayRecord.vue

@ -9,7 +9,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -98,7 +98,7 @@
received: false, received: false,
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
@ -268,7 +268,7 @@
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setParams(false) var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// productPutawayRequestSubmit(params).then(res => { // productPutawayRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
@ -291,7 +291,7 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => { getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams(true) var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
// productPutawayRecordSubmit(params).then(res => { // 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 subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
@ -342,9 +368,9 @@
} }
}) })
}) })
this.jobContent.subList = subList this.dataContent.subList = subList
this.jobContent.creator = creator; this.dataContent.creator = creator;
return this.jobContent; return this.dataContent;
}, },

76
pages/productionReceipt/job/productionReceiptDetail.vue

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

38
pages/productionReturn/coms/comReturn.vue

@ -8,7 +8,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :settingParam="jobContent" <record-com-detail-card :dataContent="item" :settingParam="dataContent"
@removeData="removeData" @updateData="updateData" @removePack="removePack"> @removeData="removeData" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -119,7 +119,7 @@
return { return {
id: '', id: '',
scanCount: 0, scanCount: 0,
jobContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
fromLocationInfo: {}, fromLocationInfo: {},
@ -285,7 +285,7 @@
}); });
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setParams(false) var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// productionReturnRequestSubmit(params).then(res => { // productionReturnRequestSubmit(params).then(res => {
// uni.hideLoading() // 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) { setParams(queryModel) {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
@ -359,9 +385,9 @@
} }
}) })
}) })
this.jobContent.subList = subList this.dataContent.subList = subList
this.jobContent.creator = creator; this.dataContent.creator = creator;
return this.jobContent; 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="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <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> </com-receipt-detail-card>
</view> </view>
<u-line /> <u-line />
@ -19,7 +19,7 @@
<view class=""> <view class="">
<required-location ref="requiredLocation" title="默认收货库位" :locationCode="toLocationCode" <required-location ref="requiredLocation" title="默认收货库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="locationTypeList"></required-location> :locationTypeList="toLocationTypeList"></required-location>
</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>
@ -89,7 +89,7 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], toLocationTypeList: [],
toLocationCode: '', toLocationCode: '',
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -173,8 +173,8 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes); that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
// that.jobContent.locationTypeList = that.locationTypeList; // that.jobContent.toLocationTypeList = that.toLocationTypeList;
that.subList = res.data.subList; that.subList = res.data.subList;
this.toLocationCode = that.subList[0].toLocationCode this.toLocationCode = that.subList[0].toLocationCode
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)

4
pages/purchaseReturn/job/returnDetail.vue

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

43
pages/purchaseReturn/record/returnRecord.vue

@ -87,7 +87,8 @@
tolocationTypeList: [], tolocationTypeList: [],
businessType: {}, // businessType: {}, //
poNumber: '', poNumber: '',
fromType: "" fromType: "",
dataContent : {}
}; };
}, },
@ -219,10 +220,10 @@
}); });
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
var params = this.setParams();
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
if (this.fromType == "requestType") { if (this.fromType == "requestType") {
var params = this.setParams(false) var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// purchaseReturnRequestSubmit(params).then(res => { // purchaseReturnRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
@ -246,7 +247,7 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => { getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams(true) var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
// purchaseReturnRecordSubmit(params).then(res => { // purchaseReturnRecordSubmit(params).then(res => {
@ -274,7 +275,7 @@
}, },
setParams(queryModel) { setRecordParams(queryModel) {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
@ -300,9 +301,35 @@
} }
}) })
}) })
this.jobContent.subList = subList this.dataContent.subList = subList
this.jobContent.creator = creator; this.dataContent.creator = creator;
return this.jobContent; 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) { showMessage(message) {

54
pages/putaway/record/putawayRecord.vue

@ -8,7 +8,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -98,7 +98,7 @@
id: '', id: '',
receiptJob: {}, receiptJob: {},
received: false, received: false,
jobContent: {}, // dataContent: {}, //
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
businessTypeInfo: {}, businessTypeInfo: {},
@ -260,7 +260,7 @@
}); });
if (this.fromType == "requestType") { if (this.fromType == "requestType") {
var params = this.setParams(false) var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// putawayRequestSubmit(params).then(res => { // putawayRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
@ -283,7 +283,7 @@
getManagementPrecisions(itemCodes, this.toLocationCode, res => { getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams(true) var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
// putawayRecordSubmit(params).then(res => { // putawayRecordSubmit(params).then(res => {
@ -305,14 +305,12 @@
} }
}, },
setParams(queryModel) { setRecordParams(queryModel) {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
// var subItem = {};
// Object.assign(subItem, detail)
if (queryModel) { if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); detail.packingNumber, detail.batch);
@ -322,20 +320,46 @@
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode detail.toLocationCode = this.toLocationCode
} else { } else {
detail.toPackingNumber = detail.packingNumber; // detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber // detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch; // detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus // detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = "" // detail.toLocationCode = ""
} }
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.jobContent.subList = subList this.dataContent.subList = subList
this.jobContent.creator = creator; this.dataContent.creator = creator;
return this.jobContent; 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: [], managementList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
toLocationInfo: {},
tolocationTypeList: [], tolocationTypeList: [],
}; };
}, },
@ -99,15 +98,14 @@
this.id = option.id; this.id = option.id;
if (this.id != undefined) { if (this.id != undefined) {
// //
// if (option.status == "JOB_PENDING") { if (option.status == "1") {
// this.receive((callback => { this.receive((callback => {
// this.received = true; this.received = true;
// this.getDetail(); this.getDetail();
// })); }));
// } else { } else {
// this.getDetail(); this.getDetail();
// } }
this.getDetail();
} }
}, },
// //
@ -174,7 +172,6 @@
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
} else { } else {
that.showMessage('列表数据为0'); 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) { calcScanCount(closeScan) {
let items = this.subList.filter(r => { let items = this.subList.filter(r => {
if (r.scaned) { if (r.scaned) {
@ -286,6 +273,7 @@
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty); .qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty itemDetail.balance.stdPackQty = result.package.stdPackQty
@ -299,6 +287,7 @@
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance.qty) ? Number( itemDetail.handleQty = Number(result.label.qty) > Number(result.balance.qty) ? Number(
result.balance.qty) : Number(result.label.qty); result.balance.qty) : Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty; itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty 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"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -97,7 +97,7 @@
received: false, received: false,
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
@ -256,9 +256,12 @@
mask: true mask: true
}); });
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// repleinshRequestSubmit(params).then(res => { // repleinshRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
@ -302,6 +305,32 @@
}) })
return subList; 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) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {

34
pages/scrap/record/scrapRecord.vue

@ -17,7 +17,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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" :isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack"> @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
@ -99,7 +99,7 @@
received: false, received: false,
isShowPackingCode: true, isShowPackingCode: true,
scanCount: 0, scanCount: 0,
jobContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
@ -263,10 +263,10 @@
mask: true mask: true
}); });
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// scrapRequestSubmit(params).then(res => { // scrapRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
@ -310,6 +310,32 @@
return subList; 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) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {

36
pages/unPlanned/record/issueRecord.vue

@ -102,7 +102,8 @@
detailSource: [], // detailSource: [], //
reason: "", reason: "",
reasonList: [], reasonList: [],
fromType: "" fromType: "",
dataContent:{}
} }
}, },
@ -222,9 +223,12 @@
this.showErrorMessage("请选择出库原因") this.showErrorMessage("请选择出库原因")
return; return;
} }
var params = this.setParams();
console.log("提交参数",JSON.stringify(params));
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setRequestParams();
console.log("提交参数",JSON.stringify(params));
// unPlannedIssueRequestSubmit(params).then(res => { // unPlannedIssueRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
@ -266,6 +270,32 @@
}) })
return subList; 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> </script>

37
pages/unPlanned/record/receiptRecord.vue

@ -100,7 +100,8 @@
reason: "", reason: "",
reasonList: [], reasonList: [],
fromType: "", fromType: "",
showToLoaction:true showToLoaction:true,
dataContent:{}
} }
}, },
@ -249,7 +250,7 @@
} }
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setParams(false) var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// unPlannedReceiptRequestbSubmit(params).then(res => { // unPlannedReceiptRequestbSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
@ -322,9 +323,35 @@
} }
}) })
}) })
this.jobContent.subList = subList this.dataContent.subList = subList
this.jobContent.creator = creator; this.dataContent.creator = creator;
return this.jobContent; 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) resolve(res)
}).catch(error => { }).catch(error => {
reject(error) reject(error)
uni.showToast({ // uni.showToast({
title:"用户信息获取失败" // title:"用户信息获取失败"
}) // })
}) })
}) })
}, },

Loading…
Cancel
Save