Browse Source

添加备货任务,修改标题更新

hella_vue3
lijuncheng 8 months ago
parent
commit
d27bcf2313
  1. 20
      src/api/request2.js
  2. 23
      src/mycomponents/scan/winScanPackAndLocation.vue
  3. 4
      src/pages.json
  4. 2
      src/pages/count/job/countJob.vue
  5. 3
      src/pages/customerReturn/job/returnJob.vue
  6. 1
      src/pages/customerReturn/record/returnRecord.vue
  7. 3
      src/pages/customerReturn/request/customerReturnRequest.vue
  8. 1
      src/pages/customerReturn/request/customerReturnRequestCreate.vue
  9. 1
      src/pages/deliver/job/deliverDetail.vue
  10. 2
      src/pages/deliver/job/deliverJob.vue
  11. 3
      src/pages/deliver/request/deliverRequest.vue
  12. 1
      src/pages/deliver/request/deliverRequestCreate.vue
  13. 3
      src/pages/inspect/job/inspectJob.vue
  14. 3
      src/pages/inspect/request/inspectRequest.vue
  15. 1
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  16. 3
      src/pages/inventoryMove/job/inventoryMoveJob.vue
  17. 2
      src/pages/issue-按批次推荐/job/issueJob.vue
  18. 1
      src/pages/issue/job/issueDetail.vue
  19. 3
      src/pages/issue/job/issueJob.vue
  20. 1
      src/pages/issue/record/issueRecord.vue
  21. 1
      src/pages/issue/request/issueRequest.vue
  22. 418
      src/pages/pick/job/pickJobDetail.vue
  23. 284
      src/pages/productReceipt/job/completeReceiveJob.vue
  24. 414
      src/pages/productReceipt/job/completeReceiveJobDetail.vue
  25. 3
      src/pages/productReceipt/job/productReceiptJob.vue
  26. 2
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  27. 3
      src/pages/productionReceipt/job/productionReceiptJob.vue
  28. 3
      src/pages/productionReturn/coms/comReturnCommonRequest.vue
  29. 4
      src/pages/productionReturn/job/returnJob.vue
  30. 1
      src/pages/productionReturn/request/returnToHoldRequest.vue
  31. 1
      src/pages/productionReturn/request/returnToStoreRequest.vue
  32. 2
      src/pages/purchaseReceipt/job/receiptDetail.vue
  33. 3
      src/pages/purchaseReceipt/job/receiptJob.vue
  34. 3
      src/pages/purchaseReturn/job/returnJob.vue
  35. 3
      src/pages/purchaseReturn/request/returnRequest.vue
  36. 1
      src/pages/purchaseReturn/request/returnRequestCreate.vue
  37. 3
      src/pages/putaway/job/putawayJob.vue
  38. 7
      src/pages/putaway/record/putawayRecord.vue
  39. 3
      src/pages/putaway/request/putawayRequest.vue
  40. 1
      src/pages/putaway/request/putawayRequestCreate.vue
  41. 1
      src/pages/repleinsh/job/repleinshDetail.vue
  42. 3
      src/pages/repleinsh/job/repleinshJob.vue
  43. 1
      src/pages/repleinsh/record/repleinshRecord.vue
  44. 3
      src/pages/repleinsh/request/repleinshRequest.vue
  45. 3
      src/pages/scrap/job/scrapJob.vue
  46. 15
      src/pages/scrap/record/scrapRecord.vue
  47. 1
      src/pages/scrap/request/scrapRequestCreate.vue
  48. 3
      src/pages/scrap/request/scrapRrequest.vue
  49. 531
      src/pages/stockUp/coms/comScanStockUpPack.vue
  50. 170
      src/pages/stockUp/coms/comStockUpDetailCard.vue
  51. 50
      src/pages/stockUp/coms/comStockUpJobCard.vue
  52. 76
      src/pages/stockUp/coms/jobInfoPopup.vue
  53. 47
      src/pages/stockUp/coms/jobListPopup.vue
  54. 98
      src/pages/stockUp/coms/stockUpDetailInfoPopup.vue
  55. 58
      src/pages/stockUp/job/stockUpJob.vue
  56. 461
      src/pages/stockUp/job/stockUpJobDetail.vue
  57. 3
      src/pages/supplierDeliver/record/supplierDeliverRecord.vue
  58. 3
      src/pages/transfer/job/issueJob.vue
  59. 3
      src/pages/transfer/job/receiptJob.vue
  60. 2
      src/pages/unPlanned/job/issueJob.vue
  61. 3
      src/pages/unPlanned/job/receiptJob.vue
  62. 1
      src/pages/unPlanned/record/issueRecord.vue
  63. 1
      src/pages/unPlanned/record/receiptRecord.vue
  64. 3
      src/pages/unPlanned/request/issueRequest.vue
  65. 1
      src/pages/unPlanned/request/issueRequestCreate.vue
  66. 3
      src/pages/unPlanned/request/receiptRequest.vue
  67. 1
      src/pages/unPlanned/request/receiptRequestCreate.vue
  68. 4
      src/static/config.js

20
src/api/request2.js

@ -2055,9 +2055,9 @@ export function productPutawayRecordSubmit(params) {
* 获取日期任务列表 * 获取日期任务列表
* @param {*} * @param {*}
*/ */
export function getPickJobList(params) { export function getStockUpJobList(params) {
return request({ return request({
url: baseApi + "/wms/pick-job-main/senior", url: baseApi + "/wms/stockup-main-job/senior",
method: "post", method: "post",
data: params, data: params,
}); });
@ -2068,9 +2068,9 @@ export function getPickJobList(params) {
* @param {*} id 任务id * @param {*} id 任务id
* *
*/ */
export function getPickJobDetail(id) { export function getStockUpJobDetail(id) {
return request({ return request({
url: baseApi + "/wms/pick-job-main/getPickJobById?id=" + id, url: baseApi + "/wms/stockup-main-job/getStockupMainJobById?id=" + id,
method: "get", method: "get",
data: {}, data: {},
}); });
@ -2081,9 +2081,9 @@ export function getPickJobDetail(id) {
* @param {*} id * @param {*} id
* *
*/ */
export function takePickJob(id) { export function takeStockUpJob(id) {
return request({ return request({
url: baseApi + "/wms/pick-job-main/accept?id=" + id, url: baseApi + "/wms/stockup-main-job/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -2094,9 +2094,9 @@ export function takePickJob(id) {
* @param {*} id * @param {*} id
* *
*/ */
export function cancleTakePickJob(id) { export function cancleTakeStockUpJob(id) {
return request({ return request({
url: baseApi + "/wms/pick-job-main/abandon?id=" + id, url: baseApi + "/wms/stockup-main-job/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -2106,9 +2106,9 @@ export function cancleTakePickJob(id) {
* 直接备货任务 提交 * 直接备货任务 提交
* @param {*} params * @param {*} params
*/ */
export function pickJobsubmit(params) { export function stockUpJobsubmit(params) {
return request({ return request({
url: baseApi + "/wms/pick-job-main/execute", url: baseApi + "/wms/stockup-main-job/execute",
method: "put", method: "put",
data: params, data: params,
}); });

23
src/mycomponents/scan/winScanPackAndLocation.vue

@ -62,10 +62,10 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getListLocationTypeDesc, getListLocationAreaTypeDesc,
checkDirectoryItemExist, checkDirectoryItemExist,
getDirectoryItemArray, getDirectoryItemArray,
getLocationTypeName, getLocationAreaTypeName,
getInventoryStatusDesc getInventoryStatusDesc
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {
@ -114,7 +114,7 @@
fromLocationCode: '', fromLocationCode: '',
fromLocation: '', fromLocation: '',
fromLocationList: [], fromLocationList: [],
fromLocationTypeArray: [], fromLocationAreaTypeList: [],
locationOnFocus: false, locationOnFocus: false,
businessType: {}, businessType: {},
inventoryStatus: [], inventoryStatus: [],
@ -138,7 +138,7 @@
} }
this.fromInventoryStatuses = this.businessType.outInventoryStatuses this.fromInventoryStatuses = this.businessType.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, 500) }, 500)
@ -162,7 +162,7 @@
}, 500) }, 500)
this.fromInventoryStatuses = jobContent.outInventoryStatuses this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaCodes); //
}, },
closeScanPopup(content) { closeScanPopup(content) {
@ -194,25 +194,22 @@
mask: true mask: true
}); });
getBasicLocationByCode(this.fromLocationCode).then(res => { getBasicLocationByCode(this.fromLocationCode).then(res => {
uni.hideLoading();
if (res.data.total > 0) { if (res.data.total > 0) {
let result = res.data.list[0]; let result = res.data.list[0];
var type = result.type; var type = result.type;
var available = result.available; var available = result.available;
if (available == "TRUE") { if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) { if (checkDirectoryItemExist(this.fromLocationAreaTypeList, type)) {
this.location = result; this.location = result;
// this.packGetFocus(); // this.packGetFocus();
this.checkPackage(scanResult); this.checkPackage(scanResult);
} else { } else {
uni.hideLoading(); var hint = getListLocationAreaTypeDesc(this.fromLocationAreaTypeList);
var hint = getListLocationTypeDesc(this.fromLocationTypeArray); this.showErrorMessage("扫描库位[" + this.code + "]是[" +
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" + getLocationAreaTypeName(areaType) + "],需要的库区是[" + hint + "]")
getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => {
this.locationGetFocus();
})
} }
} else { } else {
uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => { this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus(); this.locationGetFocus();
}) })

4
src/pages.json

@ -1116,7 +1116,7 @@
}, },
{ {
"path": "pages/pick/job/pickJob", "path": "pages/stockUp/job/stockUpJob",
"style": { "style": {
"navigationBarTitleText": "直接备货任务", "navigationBarTitleText": "直接备货任务",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
@ -1143,7 +1143,7 @@
} }
}, },
{ {
"path": "pages/pick/job/pickJobDetail", "path": "pages/stockUp/job/stockUpJobDetail",
"style": { "style": {
"navigationBarTitleText": "直接备货任务详情", "navigationBarTitleText": "直接备货任务详情",
"enablePullDownRefresh": true "enablePullDownRefresh": true

2
src/pages/count/job/countJob.vue

@ -157,6 +157,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("盘点(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -164,7 +165,6 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("盘点(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

3
src/pages/customerReturn/job/returnJob.vue

@ -153,6 +153,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("客户退货(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -160,7 +161,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("客户退货(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

1
src/pages/customerReturn/record/returnRecord.vue

@ -55,7 +55,6 @@
} from '@/common/balance.js'; } from '@/common/balance.js';
import { import {
goHome, goHome,
updateTitle,
getPackingNumberAndBatchByList, getPackingNumberAndBatchByList,
deepCopyData deepCopyData
} from '@/common/basic.js'; } from '@/common/basic.js';

3
src/pages/customerReturn/request/customerReturnRequest.vue

@ -158,6 +158,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("客户退货申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -168,9 +169,7 @@
res.options = options; res.options = options;
}) })
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("客户退货申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

1
src/pages/customerReturn/request/customerReturnRequestCreate.vue

@ -72,7 +72,6 @@
} from '@/common/balance.js'; } from '@/common/balance.js';
import { import {
goHome, goHome,
updateTitle,
deepCopyData, deepCopyData,
getPackingNumberAndBatchByList getPackingNumberAndBatchByList
} from '@/common/basic.js'; } from '@/common/basic.js';

1
src/pages/deliver/job/deliverDetail.vue

@ -61,7 +61,6 @@
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getRemoveOption, getRemoveOption,
getCurrDateTime, getCurrDateTime,

2
src/pages/deliver/job/deliverJob.vue

@ -154,6 +154,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("制品发货任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -161,7 +162,6 @@
} }
this.jobList = type === "refresh" ? list : this.receiptList.concat(list); this.jobList = type === "refresh" ? list : this.receiptList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("制品发货任务(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

3
src/pages/deliver/request/deliverRequest.vue

@ -158,6 +158,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("成品发货申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -169,7 +170,7 @@
}) })
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("成品发货申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
updateTitle("成品发货申请"); updateTitle("成品发货申请");

1
src/pages/deliver/request/deliverRequestCreate.vue

@ -35,7 +35,6 @@
import { import {
goHome, goHome,
updateTitle,
getRemoveOption, getRemoveOption,
getISODateTime getISODateTime
} from '@/common/basic.js'; } from '@/common/basic.js';

3
src/pages/inspect/job/inspectJob.vue

@ -150,6 +150,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("到货检验(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -157,7 +158,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("到货检验(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

3
src/pages/inspect/request/inspectRequest.vue

@ -169,6 +169,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("检验单申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -181,7 +182,7 @@
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("检验单申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

1
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -60,7 +60,6 @@
} from '@/common/detail.js'; } from '@/common/detail.js';
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatchByList, getPackingNumberAndBatchByList,

3
src/pages/inventoryMove/job/inventoryMoveJob.vue

@ -143,6 +143,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("库存转移(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -150,7 +151,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("库存转移(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

2
src/pages/issue-按批次推荐/job/issueJob.vue

@ -164,6 +164,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
this.updateTitle();
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -171,7 +172,6 @@
} }
that.issueList = type === "refresh" ? list : this.issueList.concat(list); that.issueList = type === "refresh" ? list : this.issueList.concat(list);
that.pageIndex++; that.pageIndex++;
this.updateTitle();
}).catch(error => { }).catch(error => {
this.loadingType = ""; this.loadingType = "";

1
src/pages/issue/job/issueDetail.vue

@ -49,7 +49,6 @@
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getRemoveOption, getRemoveOption,
getCurrDateTime, getCurrDateTime,

3
src/pages/issue/job/issueJob.vue

@ -149,6 +149,7 @@
} }
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("发料任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -156,7 +157,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("发料任务(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

1
src/pages/issue/record/issueRecord.vue

@ -56,7 +56,6 @@
import { import {
goHome, goHome,
updateTitle,
getRemoveOption, getRemoveOption,
getISODateTime, getISODateTime,
getCurrDateTime, getCurrDateTime,

1
src/pages/issue/request/issueRequest.vue

@ -175,6 +175,7 @@
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("发料申请");
this.loadingType = ""; this.loadingType = "";
that.showMessage(error.errMsg) that.showMessage(error.errMsg)
}) })

418
src/pages/pick/job/pickJobDetail.vue

@ -1,418 +0,0 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view>
<u-line color="#D8D8D8"></u-line>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'>
</comProductDetailCard>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<locationCompare title="收货库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' :title="'制品标签'" headerType="HMQ"></win-scan-pack>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
getPickJobDetail,
takePickJob,
cancleTakePickJob,
pickJobsubmit
} from '@/api/request2.js';
import {
goHome,
navigateBack,
getPackingNumberAndBatch,
} from '@/common/basic.js';
import {
getDirectoryItemArray,
getInventoryStatusName
} from '@/common/directory.js';
import {
getDataSource,
createRecordInfo,
calcHandleQty,
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPack from "@/mycomponents/scan/winScanPack.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
export default {
name: 'receipt_detail',
components: {
winScanButton,
comDetailCard,
locationCompare,
winScanPack,
jobTop,
comProductDetailCard
},
data() {
return {
id: '',
receiptJob: {},
toLocationCode: '',
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
subList: [], //subList
detailSource: [], //
toLocationAreaTypeList: [],
managementList: [],
jobStatus:"",
jobToLocationCode:""
};
},
onLoad(option) {
this.id = option.id;
if (this.id != undefined) {
//
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus=="2") {
//
cancleTakePickJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh();
},
mounted() {
},
methods: {
//
receive(callback) {
if (this.id != null) {
takePickJob(this.id).then(res => {
callback();
}).catch(error => {
this.showErrorMessage(error)
})
}
},
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getPickJobDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getScanResult(result) {
let label = result.label;
var packingNumber = label.packingNumber;
var batch = label.batch;
var qty = label.qty;
var itemCode = label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.subList.find(r =>
r.packingNumber == packingNumber &&
r.batch == batch);
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
}
}
}
},
//
continueScan() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
}
},
updateData() {
calcHandleQty(this.detailSource);
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
checkLocation() {
var isPass = true;
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
},
showMessageHint(hint, callback) {
this.$refs.comMessage.showErrorMessage(hint, res => {
if (res) {
callback()
}
});
},
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
if (!this.checkLocation()) {
return
}
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
} else {
//
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
}
}
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
pickJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<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
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.scanPopupGetFocus();
}
});
})
},
showErrorMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.scanPopupGetFocus();
}
});
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1)
})
},
}
}
</script>
<style scoped lang="scss">
</style>

284
src/pages/productReceipt/job/completeReceiveJob.vue

@ -1,8 +1,288 @@
<template> <template>
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask">
</job-filter>
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item
:right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)">
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'></com-product-job-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></job-list-popup>
<job-info-popup ref='jobInfoPopup'></job-info-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
<comMessage ref="comMessage"></comMessage>
</view>
</view>
</template> </template>
<script> <script>
import {
getProductReceiptJobList,
cancleTakeProductReceiptJob
} from '@/api/request2.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getDetailOption,
getDetailGiveupOption
} from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comProductJobCard from '@/pages/productReceipt/coms/comProductJobCard.vue'
import jobListPopup from '@/pages/productReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue'
export default {
name: 'receipt',
components: {
comEmptyView,
jobFilter,
comProductJobCard,
jobListPopup,
jobInfoPopup
},
data() {
return {
jobList: [],
pageNo: 1,
pageSize: 10,
totalCount: 0,
loadingType: "nomore",
checkedToday: false,
checkedWaitTask: false,
todayTime: "",
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
};
},
onShow() {
this.getList("refresh")
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
uni.navigateBack({
delta: 1
})
return false;
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
methods: {
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var filters = []
if (this.checkedToday) {
filters.push({
column: "request_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getProductReceiptJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
updateTitle("完工收货任务(装配)(" + this.totalCount + ")");
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();
}
updateTitle("完工收货任务(装配)");
this.loadingType = "";
uni.hideLoading();
that.showMessage(error)
})
},
openJobDetail(item) {
uni.navigateTo({
url: './productReceiptDetail?id=' + item.id + '&status=' + item.status
});
},
showItemList(itemList) {
this.$refs.jobListPopup.openPopup(itemList);
},
selectedItem(item) {
this.openJobDetail(item);
},
swipeClick(e, dataContent) {
if (e.content.text == "详情") {
this.openjobInfoPopup(dataContent);
} else if (e.content.text == "放弃") {
this.$refs.comMessage.showQuestionMessage("确定要放弃当前任务?",
res => {
if (res) {
this.cancleJob(dataContent.id);
}
});
}
},
openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item)
},
cancleJob(id) {
cancleTakeProductReceiptJob(id).then(res => {
if(res.data){
this.getList("refresh")
uni.showToast({
title:"放弃任务成功"
})
}else {
this.showMessage("放弃任务失败")
}
}).catch(error => {
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) {
this.checkedToday = state;
this.todayTime = creationTime;
this.getList("refresh");
},
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
this.status = jobStatus;
this.getList("refresh");
},
getScanNumber(code) {
this.getDataListByType(code)
},
getDataListByType(code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: code
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getProductReceiptJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
} else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]);
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
}
}
</script> </script>
<style> <style scoped lang="scss">
</style>
</style>

414
src/pages/productReceipt/job/completeReceiveJobDetail.vue

@ -1,8 +1,418 @@
<template> <template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view>
<u-line color="#D8D8D8"></u-line>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'>
</comProductDetailCard>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<locationCompare title="收货库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' :title="'制品标签'" headerType="HMQ"></win-scan-pack>
<comMessage ref="comMessage"></comMessage>
</view>
</template> </template>
<script> <script>
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
getProductReceiptJobDetail,
takeProductReceiptJob,
cancleTakeProductReceiptJob,
productReceiptJobsubmit
} from '@/api/request2.js';
import {
goHome,
navigateBack,
getPackingNumberAndBatch,
} from '@/common/basic.js';
import {
getDirectoryItemArray,
getInventoryStatusName
} from '@/common/directory.js';
import {
getDataSource,
createRecordInfo,
calcHandleQty,
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPack from "@/mycomponents/scan/winScanPack.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
export default {
name: 'receipt_detail',
components: {
winScanButton,
comDetailCard,
locationCompare,
winScanPack,
jobTop,
comProductDetailCard
},
data() {
return {
id: '',
receiptJob: {},
toLocationCode: '',
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
subList: [], //subList
detailSource: [], //
toLocationAreaTypeList: [],
managementList: [],
jobStatus:"",
jobToLocationCode:""
};
},
onLoad(option) {
this.id = option.id;
if (this.id != undefined) {
//
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus=="2") {
//
cancleTakeProductReceiptJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh();
},
mounted() {
},
methods: {
//
receive(callback) {
if (this.id != null) {
takeProductReceiptJob(this.id).then(res => {
callback();
}).catch(error => {
this.showErrorMessage(error)
})
}
},
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getProductReceiptJobDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getScanResult(result) {
let label = result.label;
var packingNumber = label.packingNumber;
var batch = label.batch;
var qty = label.qty;
var itemCode = label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.subList.find(r =>
r.packingNumber == packingNumber &&
r.batch == batch);
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
}
}
}
},
//
continueScan() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
}
},
updateData() {
calcHandleQty(this.detailSource);
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
checkLocation() {
var isPass = true;
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
},
showMessageHint(hint, callback) {
this.$refs.comMessage.showErrorMessage(hint, res => {
if (res) {
callback()
}
});
},
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
if (!this.checkLocation()) {
return
}
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
} else {
//
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
}
}
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<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
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.scanPopupGetFocus();
}
});
})
},
showErrorMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.scanPopupGetFocus();
}
});
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1)
})
},
}
}
</script> </script>
<style> <style scoped lang="scss">
</style> </style>

3
src/pages/productReceipt/job/productReceiptJob.vue

@ -155,6 +155,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("制品收货(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -162,7 +163,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("制品收货(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

2
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -60,7 +60,6 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatch, getPackingNumberAndBatch,
@ -183,7 +182,6 @@
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
// updateTitle(this.jobContent.number);
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }

3
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -156,6 +156,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("生产收料(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -163,7 +164,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("生产收料(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

3
src/pages/productionReturn/coms/comReturnCommonRequest.vue

@ -183,6 +183,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle(this.title + "(" + this.totalCount + ")")
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -195,7 +196,7 @@
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle(this.title + "(" + this.totalCount + ")")
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

4
src/pages/productionReturn/job/returnJob.vue

@ -156,6 +156,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("生产退料(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -163,12 +164,13 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("生产退料(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("生产退料");
this.loadingType = ""; this.loadingType = "";
uni.hideLoading(); uni.hideLoading();
that.showMessage(error) that.showMessage(error)

1
src/pages/productionReturn/request/returnToHoldRequest.vue

@ -10,7 +10,6 @@
import { import {
goHome, goHome,
updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
export default { export default {

1
src/pages/productionReturn/request/returnToStoreRequest.vue

@ -10,7 +10,6 @@
import { import {
goHome, goHome,
updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
export default { export default {

2
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -65,7 +65,6 @@
goHome, goHome,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatch, getPackingNumberAndBatch,
updateTitle,
compareAsc, compareAsc,
navigateBack navigateBack
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -207,7 +206,6 @@
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
// updateTitle("-" + that.jobContent.number);
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

3
src/pages/purchaseReceipt/job/receiptJob.vue

@ -151,6 +151,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购收货(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -158,7 +159,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("采购收货(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

3
src/pages/purchaseReturn/job/returnJob.vue

@ -153,6 +153,7 @@
} }
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购退货(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -160,7 +161,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("采购退货(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

3
src/pages/purchaseReturn/request/returnRequest.vue

@ -157,6 +157,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购退货申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -168,7 +169,7 @@
}) })
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("采购退货申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
uni.hideLoading(); uni.hideLoading();

1
src/pages/purchaseReturn/request/returnRequestCreate.vue

@ -44,7 +44,6 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
deepCopyData, deepCopyData,
getCurrDateOneMonthsTimes getCurrDateOneMonthsTimes

3
src/pages/putaway/job/putawayJob.vue

@ -155,6 +155,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购上架(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -162,7 +163,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("采购上架(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

7
src/pages/putaway/record/putawayRecord.vue

@ -57,7 +57,6 @@
import { import {
goHome, goHome,
updateTitle,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatchByList, getPackingNumberAndBatchByList,
deepCopyData deepCopyData
@ -123,7 +122,7 @@
}; };
}, },
onLoad(option) { onLoad(option) {
this.clear(); this.clearData();
var typeCode = "PurchasePutaway" var typeCode = "PurchasePutaway"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -443,7 +442,7 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clear(); this.clearData();
}) })
}, },
@ -457,7 +456,7 @@
} }
}, },
clear() { clearData() {
this.fromLocationInfo = {}; this.fromLocationInfo = {};
this.fromLocationCode = ''; this.fromLocationCode = '';
this.fromWarehouseCode = ''; this.fromWarehouseCode = '';

3
src/pages/putaway/request/putawayRequest.vue

@ -156,6 +156,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购上架申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -168,7 +169,7 @@
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("采购上架申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

1
src/pages/putaway/request/putawayRequestCreate.vue

@ -58,7 +58,6 @@
import { import {
goHome, goHome,
updateTitle,
getCurrDateTime, getCurrDateTime,
deepCopyData, deepCopyData,
getPackingNumberAndBatchByList getPackingNumberAndBatchByList

1
src/pages/repleinsh/job/repleinshDetail.vue

@ -51,7 +51,6 @@
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getRemoveOption, getRemoveOption,
getCurrDateTime, getCurrDateTime,

3
src/pages/repleinsh/job/repleinshJob.vue

@ -155,6 +155,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("补料(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -162,7 +163,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("补料(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

1
src/pages/repleinsh/record/repleinshRecord.vue

@ -55,7 +55,6 @@
import { import {
goHome, goHome,
updateTitle,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatch getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';

3
src/pages/repleinsh/request/repleinshRequest.vue

@ -137,6 +137,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购上架申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -149,7 +150,7 @@
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("采购上架申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

3
src/pages/scrap/job/scrapJob.vue

@ -150,6 +150,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("报废出库(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -157,7 +158,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("报废出库(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

15
src/pages/scrap/record/scrapRecord.vue

@ -1,9 +1,9 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='getLocation' v-if="fromLocationCode==''"></com-blank-view> <com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="fromLocationCode!=''"> <view class="page-wraper" v-if="detailSource.length>0">
<view class="uni-flex uni-row u-col-center" style="width: 100%;" v-if="detailSource.length>0"> <view class="uni-flex uni-row u-col-center" style="width: 100%;" v-if="detailSource.length>0">
<view class="" style=" text-align: center;font-size: 32rpx;font-weight: 700;margin-left: 20rpx;"> <view class="" style=" text-align: center;font-size: 32rpx;font-weight: 700;margin-left: 20rpx;">
报废原因 : 报废原因 :
@ -183,9 +183,6 @@
this.$forceUpdate(); this.$forceUpdate();
}, },
updateData() {
this.calcHandleQty();
},
removeItem(index, item) { removeItem(index, item) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
}, },
@ -290,14 +287,6 @@
return this.dataContent; return this.dataContent;
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);

1
src/pages/scrap/request/scrapRequestCreate.vue

@ -56,7 +56,6 @@
import { import {
goHome, goHome,
updateTitle,
getCurrDateOneMonthsTimes, getCurrDateOneMonthsTimes,
navigateBack navigateBack
} from '@/common/basic.js'; } from '@/common/basic.js';

3
src/pages/scrap/request/scrapRrequest.vue

@ -156,6 +156,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("报废出库申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -167,7 +168,7 @@
}) })
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("报废出库申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

531
src/pages/stockUp/coms/comScanStockUpPack.vue

@ -0,0 +1,531 @@
<template>
<view>
<uni-popup ref="popup" :maskClick='false'>
<view class="">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描箱码
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
padding:20rpx;
border-radius: 8rpx;">
<view class="uni-center">
位置 :
</view>
<view class="" style="width: 75%;padding: 0rpx">
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 15rpx;font-size: 30rpx;">
{{positionInfo}}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList" :defaultValue="defaultValueList"
@confirm="confirmSelect"></u-select>
</view>
</view>
</view>
<u-line class='line_color'></u-line> -->
<view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
margin-top: 8rpx;
border-radius: 8rpx;">
<view class="uni-center" style="width: 25%; ">
来源库位
</view>
<view class="" style="width: 75%; padding: 8rpx;">
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请选择库位"
@confirm="fromLocationUpdate"></uni-combox>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
:headerType="headerType" :isShowHistory="false">
</win-com-scan>
<view style="width: 100%;">
<view style="width: 100%;" v-if="issueRecord.length>0">
<view class="uni-flex uni-row space-between u-col-center">
<view class="" style="padding: 10rpx;">
历史记录
</view>
<view class="" style="padding-right: 10rpx;">
<u-icon :name="expendIcon" size="35rpx" @click="expands()"></u-icon>
</view>
</view>
<u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'>
</u-line>
<scroll-view scroll-y="true" class="scroll-view"
v-if="expand&&issueRecord.length>0">
<view class="uni-flex u-col" v-for="(record,index) in issueRecord">
<view style="width: 100%;">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,record,index)"
:right-options="scanOptions">
<view style="padding: 0px 10px">
<balance :dataContent="record" :isShowLocation="false"
:isShowStdPack="false"></balance>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line class='line_color'></u-line>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<comMessage ref="comMessage"></comMessage>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
</view>
</template>
<script>
import winComScan from '@/mycomponents/scan/winComScan.vue'
import balance from '@/mycomponents/balance/balance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import {
getDetailOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import {
calc
} from '@/common/calc.js';
import {
getWorkShopLineStation
} from '@/api/request2.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
export default {
name: 'winScanPack',
components: {
winComScan,
balance,
balanceQtyEdit,
balanceSelect
},
props: {
title: {
type: String,
default: ''
},
headerType: {
type: String,
default: "HPQ,HMQ"
},
},
data() {
return {
dataContent: {},
jobContent: {},
expendIcon: 'arrow-down',
show: false,
scanList: [],
toLocation: null,
toLocationCode: '',
fromLocationList: [],
fromLocationCode: '',
fromLocation: null,
issueRecord: [], //
expand: true,
scanOptions: {},
editItem: {},
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
label: {},
fromInventoryStatuses: "",
packageInfo: {}
}
},
created() {
},
watch: {},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
},
methods: {
openScanPopup(content, jobcontent) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeScanPopup() {
this.$refs.popup.close();
this.$emit("closeScan")
//
// Object.assign(this.$data, this.$options.data());
},
initData() {
let that = this;
that.fromLocationList = [];
if (that.dataContent != null) {
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode;
that.fromLocationList = that.getFromLocationList();
}
},
showBalanceSelect(items, packageInfo) {
this.packageInfo = packageInfo;
this.$refs.balanceSelect.openPopup(items);
},
getFromLocationList() {
let list = [];
let location = this.dataContent.find(r => r.toLocationCode == this.toLocationCode);
if (location != undefined) {
location.Items.forEach(item => {
item.Locations.forEach(f => {
list.push(f.fromLocationCode)
})
})
this.fromLocationCode = list[0];
return list;
} else {
this.$refs.comMessage.showErrorMessages('需求库位【' + this.toLocationCode + '】不存在', res => {
this.toLocationCode = '';
});
}
},
fromLocationUpdate(fromlocation) {
let location = this.fromLocationList.find(r => r == fromlocation)
if (location == undefined) {
this.fromLocationCode = ''
this.showErrorMessage('发货库位【' + fromlocation + '】不存在')
}
},
onScan(result) {
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
});
return;
}
let packageInfo = result.package;
let itemCode = result.label.itemCode;
let packingCode = result.label.packingNumber;
let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) {
that.showErrorMessage('未查找到物料【' + itemCode + '】的发货明细',
res => {
that.getfocus();
}
)
return;
} else {
//
uni.showLoading({
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.label = result.label;
this.showBalanceSelect(balanceRes.data.list, packageInfo);
}
} else {
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
}
} catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading();
}
},
selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo);
},
afterGetBalance(label, balance, packageInfo) {
try {
let that = this;
let itemCode = label.itemCode;
let packingCode = label.packingNumber;
let lot = label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
if (fromLocation != undefined) {
let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) {
if (batch.Records == undefined) {
batch.Records = [];
}
let record = batch.Records.find(r => r.packingNumber == packingCode);
if (record == undefined) {
//
if (batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance, packageInfo)
} else {
//
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance, packageInfo);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => {
that.getfocus();
}
)
}
}
} else {
that.addRecord(batch, label, balance, packageInfo)
}
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
res => {
that.getfocus();
}
)
}
} else {
if (this.jobContent.AllowModifyBatch == null) {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发货明细,是否要继续发货?', res => {
if (res) {
let batch = that.createBatchInfo(label, balance);
fromLocation.Batchs.unshift(batch);
}
})
} else {
that.showErrorMessage('未查找到批次【' + lot + '】的发货明细',
res => {
that.getfocus();
});
}
}
} else {
that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的发货明细',
res => {
that.getfocus();
}
)
}
} catch (e) {
that.showErrorMessage(e.stack,
res => {
that.getfocus();
}
)
}
},
createBatchInfo(data, balance) {
let batch = {
batch: data.lot,
qty: 0,
uom: data.uom,
handleQty: Number(data.qty),
Records: []
}
let record = this.creatRecord(data, balance);
batch.Records.push(record);
this.issueRecord.unshift(record)
return batch;
},
creatRecord(label, balance, packageInfo) {
balance.packQty = packageInfo.packQty
balance.packUnit = packageInfo.packUnit
let record = {
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode: label.supplierCode
}
return record;
},
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},
addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.getfocus();
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
expands() {
this.expand = !this.expand;
this.expendIcon = this.expand == true ? "arrow-down" : "arrow-up"
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
// item.balance.balanceQty = item.balance.qty;
item.balance.balanceQty = item.balance.qty;
this.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(record, index) {
this.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
record.qty = 0;
this.issueRecord.splice(index, 1)
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b
.batch == record.batch);
let rIndex = batch.Records.findIndex(r => r.packingNumber == record
.packingNumber && r
.batch == record.batch);
batch.Records.splice(rIndex, 1);
})
}
this.$emit('updateData', item);
}
});
},
packGetFocus() {
this.$refs.comscan.getfocus();
},
packLoseFocus() {
this.$refs.comscan.losefocus();
},
showMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showMessage(message, callback);
})
},
showErrorMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, callback);
})
},
showQuestionMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showQuestionMessage(message, callback);
})
},
confirm(val) {
this.editItem.qty = Number(val);
this.$emit('updateData', this.editItem)
},
cancle() {
this.closeScanPopup()
}
}
}
</script>
<style lang="scss">
button {
border: none;
}
button::after {
border: none
}
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
padding: 10rpx;
}
</style>

170
src/pages/stockUp/coms/comStockUpDetailCard.vue

@ -0,0 +1,170 @@
<template>
<view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.Items">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<!-- 物品 -->
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
</template>
<u-line />
<view v-for="(loacation,index) in item.Locations" :key="index">
<view>
<view class="uni-flex uni-row space-between">
<!-- 推荐库位 -->
<location :locationCode="loacation.fromLocationCode">
</location>
</view>
<view v-for="(batch,index) in loacation.Batchs" :key="index">
<recommend-balance style='margin-left: 20px;' :detail="batch"
:isShowLocation="false" :isShowPack="batch.packingNumber!=null && batch.packingNumber!=''">
</recommend-balance>
<view class="uni-flex uni-row" v-if='batch.Records.length>0'>
<view class="center " style=" width: 20px; color: #0CC2B6; margin-left: 40px;">
实际
</view>
<view class="uni-flex uni-column" style="width: 100%;">
<view v-for="(record,index) in batch.Records" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="scanOptions">
<handle-balance :detail="record" :isShowLocation="false"
:isShowBatch="batch.packingNumber!=null">
</handle-balance>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import handleBalance from '@/mycomponents/balance/handleBalance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import {
getDetailOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData'],
components: {
itemQty,
recommend,
recommendBalance,
handleBalance,
recommendQtyEdit,
requiredLocation,
balanceQtyEdit,
location,
detailInfoPopup
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
},
watch: {
},
data() {
return {
option: [],
showItem: {},
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
},
swipeClick(e, batch, record, index) {
if (e.content.text == "编辑") {
this.edit(batch, record)
} else if (e.content.text == "移除") {
this.remove(batch, record, index)
}
},
edit(batch, item) {
let that = this;
that.editItem = item;
that.batchItem = batch;
item.balance.balanceQty=item.balance.qty;
that.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(batch, record, index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
batch.Records.splice(index, 1);
this.resizeCollapse();
this.$emit('updateData', record)
}
});
},
confirm(val) {
this.editItem.qty = val;
this.$emit('updateData', this.editItem)
// let qty = 0;
// this.batchItem.Records.forEach(r => {
// qty += Number(r.qty);
// })
// this.batchItem.handleQty = qty;
}
}
}
</script>
<style>
</style>

50
src/pages/stockUp/coms/comStockUpJobCard.vue

@ -0,0 +1,50 @@
<template>
<job-com-main-card :dataContent="dataContent">
<view class="task_item">
<view class="task_text">
<view class="">
申请单号 : {{dataContent.requestNumber}}
</view>
</view>
<view class="task_text">
<view class="">
发货计划单号 : {{dataContent.deliverPlanNumber}}
</view>
</view>
<view class="task_text">
<view class="">
客户代码 : {{dataContent.customerCode}}
</view>
</view>
</view>
</job-com-main-card>
</template>
<script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
export default {
components: {
jobComMainCard,
},
data() {
return {};
},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
</script>
<style lang="scss">
</style>

76
src/pages/stockUp/coms/jobInfoPopup.vue

@ -0,0 +1,76 @@
<template>
<view class="">
<uni-popup ref="popup">
<job-common-info :dataContent="dataContent" @onClose="closePopup">
<view class="">
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">发货计划单号 : </text>
<text class="text_wrap">{{dataContent.DeliverPlanNumber}} </text>
</view>
<view class="item">
<text class="item_title">客户发货单号 : </text>
<text class="text_wrap">{{dataContent.CustomerDeliverNumber}} </text>
</view>
<view class="item">
<text class="item_title">客户代码 : </text>
<text class="text_wrap">{{dataContent.CustomerCode}} </text>
</view>
<view class="item">
<text class="item_title">客户月台代码 : </text>
<text class="text_wrap">{{dataContent.CustomerDockCode}} </text>
</view>
<view class="item">
<text class="item_title">承运商 : </text>
<text class="text_wrap">{{dataContent.carrierCode}} </text>
</view>
<view class="item">
<text class="item_title">运输方式 : </text>
<text class="text_wrap">{{dataContent.transferMode}} </text>
</view>
<view class="item">
<text class="item_title">车牌号 : </text>
<text class="text_wrap">{{dataContent.vehiclePlateNumber}} </text>
</view>
</view>
</view>
<u-line></u-line>
</job-common-info>
</uni-popup>
</view>
</template>
<script>
import jobCommonInfo from '@/mycomponents/job/jobCommonInfo.vue'
export default {
components: {
jobCommonInfo,
},
data() {
return {
dataContent: {
type: Object,
default: {}
}
}
},
mounted() {},
props: {},
methods: {
openPopup(val) {
this.dataContent = val;
this.$refs.popup.open('bottom')
},
closePopup() {
this.$refs.popup.close()
},
}
}
</script>
<style>
</style>

47
src/pages/stockUp/coms/jobListPopup.vue

@ -0,0 +1,47 @@
<template>
<uni-popup ref="popupItems">
<com-popup @onClose="closePopup">
<view v-for="(item, index) in receiptList" :key="index">
<com-deliver-job-card :dataContent="item" @click='selectItem(item)'></com-deliver-job-card>
<u-line></u-line>
</view>
</com-popup>
</uni-popup>
</template>
<script>
import comPopup from '@/mycomponents/common/comPopup.vue'
import comDeliverJobCard from '@/pages/deliver/coms/comDeliverJobCard.vue'
export default {
emits: ["selectedItem"],
components: {
comPopup,
comDeliverJobCard
},
props: {
},
data() {
return {
receiptList: []
}
},
methods: {
openPopup(items) {
this.receiptList = items;
this.$refs['popupItems'].open("center");
},
closePopup() {
this.$refs.popupItems.close()
},
selectItem(item) {
this.$emit("selectedItem", item);
this.$refs['popupItems'].close();
},
}
}
</script>
<style>
</style>

98
src/pages/stockUp/coms/stockUpDetailInfoPopup.vue

@ -0,0 +1,98 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent="dataContent" @onClose="closePopup">
<view class="">
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">标包数量 : </text>
<text class="text_wrap">{{dataContent.packQty}} </text>
</view>
<view class="item">
<text class="item_title">标包单位 : </text>
<text class="text_wrap">{{getPackUnitInfo(dataContent.packUnit)}} </text>
</view>
</view>
</view>
<u-line></u-line>
<view class="">
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">订单号 : </text>
<text class="text_wrap">{{dataContent.poNumber}} </text>
</view>
<view class="item">
<text class="item_title">订单行 : </text>
<text class="text_wrap">{{dataContent.poLine}} </text>
</view>
<view class="item">
<text class="item_title">项目代码 : </text>
<text class="text_wrap">{{dataContent.projectCode}} </text>
</view>
<view class="item">
<text class="item_title">到货日期 : </text>
<text class="text_wrap">{{dateFormat(dataContent.arriveDate)}} </text>
</view>
<view class="item">
<text class="item_title">生产日期 : </text>
<text class="text_wrap">{{dateFormat(dataContent.produceDate)}} </text>
</view>
<view class="item">
<text class="item_title">过期日期 : </text>
<text class="text_wrap">{{dateFormat(dataContent.expireDate)}} </text>
</view>
</view>
</view>
</detail-common-info>
</uni-popup>
</view>
</template>
<script>
import {getPackUnitInfo} from "@/common/directory.js"
import {
dateFormat
} from '@/common/basic.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {
type: Object,
default: {}
}
}
},
mounted() {},
props: {},
methods: {
openPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closePopup() {
this.$refs.popup.close()
},
getPackUnitInfo(value){
return getPackUnitInfo(value).label
},
dateFormat(value){
return dateFormat(value)
}
}
}
</script>
<style>
</style>

58
src/pages/pick/job/pickJob.vue → src/pages/stockUp/job/stockUpJob.vue

@ -5,13 +5,13 @@
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask"> :checkedWaitTask="checkedWaitTask">
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index"> <view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions" <uni-swipe-action-item
:right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'></com-product-job-card> <comStockUpJobCard :dataContent="item" @click='openJobDetail(item)'></comStockUpJobCard>
</uni-swipe-action-item> </uni-swipe-action-item>
</view> </view>
</uni-swipe-action> </uni-swipe-action>
@ -20,15 +20,17 @@
<job-info-popup ref='jobInfoPopup'></job-info-popup> <job-info-popup ref='jobInfoPopup'></job-info-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
<comMessage ref="comMessage"></comMessage>
</view> </view>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import { import {
getPickJobList, getStockUpJobList,
cancleTakePickJob cancleTakeStockUpJob
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -43,17 +45,17 @@
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue' import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comStockUpJobCard from '@/pages/stockUp/coms/comStockUpJobCard.vue'
import jobListPopup from '@/pages/stockUp/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/stockUp/coms/jobInfoPopup.vue'
import comProductJobCard from '@/pages/productReceipt/coms/comProductJobCard.vue'
import jobListPopup from '@/pages/productReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue'
export default { export default {
name: 'receipt', name: 'Deliver',
components: { components: {
comEmptyView, comEmptyView,
jobFilter, jobFilter,
comProductJobCard, comStockUpJobCard,
jobListPopup, jobListPopup,
jobInfoPopup jobInfoPopup
}, },
@ -74,14 +76,13 @@
}, },
onShow() { onShow() {
this.getList("refresh") this.getList('refresh');
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
}, },
onReachBottom() { onReachBottom() {
// //
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
@ -94,7 +95,6 @@
this.getList('refresh'); this.getList('refresh');
}, },
//退 //退
onBackPress(options) { onBackPress(options) {
if (options.from === 'navigateBack') { if (options.from === 'navigateBack') {
@ -134,19 +134,19 @@
value: this.todayTime value: this.todayTime
}) })
} }
filters.push({ filters.push({
column: "status", column: "status",
action: "in", action: "in",
value: this.status value: this.status
}) })
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
} }
getPickJobList(params).then(res => { getStockUpJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@ -154,20 +154,20 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("直接备货任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
return; return;
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.receiptList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("制品收货(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("制品收货"); updateTitle("直接备货任务");
this.loadingType = ""; this.loadingType = "";
uni.hideLoading(); uni.hideLoading();
that.showMessage(error) that.showMessage(error)
@ -176,7 +176,7 @@
openJobDetail(item) { openJobDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './pickJobDetail?id=' + item.id + '&status=' + item.status url: './stockUpJobDetail?id=' + item.id + '&status=' + item.status
}); });
}, },
@ -206,13 +206,13 @@
}, },
cancleJob(id) { cancleJob(id) {
cancleTakePickJob(id).then(res => { cancleTakeStockUpJob(id).then(res => {
if (res.data) { if(res.data){
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({
title: "放弃任务成功" title:"放弃任务成功"
}) })
} else { }else {
this.showMessage("放弃任务失败") this.showMessage("放弃任务失败")
} }
}).catch(error => { }).catch(error => {
@ -251,13 +251,13 @@
action: "==", action: "==",
value: code value: code
}) })
var params = { var params = {
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
} }
getPickJobList(params).then(res => { getStockUpJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务'); that.showMessage('未查找到' + '【' + code + '】的收货任务');
@ -276,11 +276,11 @@
} }
}); });
}, }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

461
src/pages/stockUp/job/stockUpJobDetail.vue

@ -0,0 +1,461 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号{{jobContent.requestNumber}}
</view>
<u-line color="#D8D8D8"></u-line>
<view class="cen_card" style="padding: 5rpx;">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">客户代码</view>
<view>{{jobContent.customerCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">客户寄售库</view>
<view>{{toLocationCode}}</view>
</view>
</view>
<u-line />
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource" :key="index">
<comStockUpDetailCard ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'>
</comStockUpDetailCard>
</view>
</scroll-view>
</view>
<div class="btn_bottom">
<view class="" style="display: flex;flex-direction: row;">
<view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
</div>
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button>
<comScanStockUpPack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
</comScanStockUpPack>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getStockUpJobDetail,
getBasicLocationByCode,
takeStockUpJob,
cancleTakeStockUpJob,
stockUpJobsubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
navigateBack,
getRemoveOption,
getCurrDateTime,
getDirectoryItemArray,
getPackingNumberAndBatch,
} from '@/common/basic.js';
import {
getDataSource
} from '@/pages/issue/js/issue.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comStockUpDetailCard from '@/pages/stockUp/coms/comStockUpDetailCard.vue'
import comScanStockUpPack from '@/pages/stockUp/coms/comScanStockUpPack.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
name: 'issueDetail',
components: {
jobDetailPopup,
winScanButton,
comStockUpDetailCard,
comScanStockUpPack,
jobTop
},
data() {
return {
id: '',
jobContent: {}, //
subList: [], //subList
detailSource: [], //
detailOptions: [],
scanOptions: [],
status: "",
toLocationCode: "",
jobStatus:""
};
},
props: {
},
onLoad(option) {
this.id = option.id;
if (this.id != undefined) {
//
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus=="2") {
//
cancleTakeStockUpJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
methods: {
//
receive(callback) {
if (this.id != null) {
takeStockUpJob(this.id).then(res => {
callback();
}).catch(error => {
this.showErrorMessage(error)
})
}
},
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getStockUpJobDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.jobStatus = res.data.status;
that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList)
that.toLocationCode = that.subList[0].toLocationCode
that.resizeCollapse();
} else {
that.showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
closeScan() {
this.resizeCollapse();
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.comIssueDetailCard.forEach(r => {
r.resizeCollapse();
})
});
},
submit() {
uni.showLoading({
title: "提交中....",
mask: true
});
//
var itemCodes = []
let locationCode = this.detailSource[0].toLocationCode
this.detailSource.forEach(toLocationCode => {
toLocationCode.Items.forEach(item => {
itemCodes.push(item.itemCode)
})
})
//使
if (locationCode == null) {
this.submitJob();
} else {
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.submitJob();
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
}
},
submitJob() {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
stockUpJobsubmit(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)
})
},
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(toLocationCode => {
toLocationCode.Items.forEach(item => {
item.Locations.forEach(fromLocation => {
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
subItem.recordList = [];
if (batch.Records.length > 0) {
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.supplierCode = r.supplierCode;
//使
if (this.toLocationCode ==null) {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;
} else {
var info = getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
record.toBatch = info.batch;
}
subItem.recordList.push(record);
})
subList.push(subItem);
}
})
})
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
return this.jobContent;
},
cancel() {
let that = this;
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的物料和目标库位信息?', res => {
if (res) {
that.clearInfo();
}
});
},
clearInfo() {
this.dataContent.itemCodeList.forEach(res => {
if (res.recommendList != null) {
res.recommendList.forEach(res1 => {
if (res1.locationCodeList != null) {
res1.locationCodeList.forEach(res2 => {
if (res2.packingCodeList != null) {
res2.packingCodeList.forEach(res3 => {
res3.itemCode = "";
res3.qty = 0;
})
}
})
}
})
}
})
},
updateData(record) {
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode);
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode);
let itemHandleQty = 0;
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b
.packingNumber == null || b.packingNumber == '') && b.batch ==
record.batch);
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty = calc.add(handleQty, res.qty)
})
batch.handleQty = handleQty;
itemHandleQty = calc.add(itemHandleQty, handleQty)
}
})
}
// item.handleQty=itemHandleQty;
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1)
})
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
closeScanMessage() {
this.scanPopupGetFocus();
},
confirm(data) {
this.dataContent = data;
},
confirmResult(result) {
this.dataContent = result;
this.$forceUpdate();
},
openScanDetailPopup() {
var datacontent = {}
//
// Object.assign(datacontent, this.detailSource);
this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent);
},
closeScanPopup() {
this.updateCommitBtn();
},
}
};
</script>
<style scoped lang="scss">
.uni-numbox__value {
width: 40px;
}
button[disabled] {
background-color: #3C9CFF;
color: #fff;
opacity: 0.7;
}
// /deep/ .input-value {
// font-size: 16px;
// }
// /deep/ .uni-collapse-item__title-text {
// font-size: 16px;
// }
// /deep/ .uni-collapse-item--border {
// border-bottom-width: 0px;
// border-bottom-color: #ebeef5;
// }
// /deep/ .uni-collapse-item--border {
// border-bottom-width: 1px;
// border-bottom-color: #ebeef5;
// }
</style>

3
src/pages/supplierDeliver/record/supplierDeliverRecord.vue

@ -142,6 +142,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("供应商发货记录(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -149,7 +150,7 @@
} }
this.recordList = type === "refresh" ? list : this.recordList.concat(list); this.recordList = type === "refresh" ? list : this.recordList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("供应商发货记录(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

3
src/pages/transfer/job/issueJob.vue

@ -156,6 +156,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("调拨出库任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -163,7 +164,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("调拨出库任务(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

3
src/pages/transfer/job/receiptJob.vue

@ -155,6 +155,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("调拨入库任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -162,7 +163,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("调拨入库任务(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

2
src/pages/unPlanned/job/issueJob.vue

@ -158,6 +158,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("计划外出库(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -165,7 +166,6 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("计划外出库(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

3
src/pages/unPlanned/job/receiptJob.vue

@ -145,6 +145,7 @@
} }
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("计划外入库(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -152,7 +153,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("计划外入库(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

1
src/pages/unPlanned/record/issueRecord.vue

@ -69,7 +69,6 @@
import { import {
goHome, goHome,
updateTitle,
deepCopyData deepCopyData
} from '@/common/basic.js'; } from '@/common/basic.js';

1
src/pages/unPlanned/record/receiptRecord.vue

@ -72,7 +72,6 @@
} from 'decimal.js'; // } from 'decimal.js'; //
import { import {
goHome, goHome,
updateTitle,
deepCopyData, deepCopyData,
getPackingNumberAndBatchByList getPackingNumberAndBatchByList
} from '@/common/basic.js'; } from '@/common/basic.js';

3
src/pages/unPlanned/request/issueRequest.vue

@ -159,6 +159,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("计划外出库申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -171,7 +172,7 @@
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("计划外出库申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

1
src/pages/unPlanned/request/issueRequestCreate.vue

@ -75,7 +75,6 @@
import { import {
goHome, goHome,
updateTitle,
deepCopyData, deepCopyData,
getCurrDateTimes, getCurrDateTimes,
getCurrDateOneMonthsTimes, getCurrDateOneMonthsTimes,

3
src/pages/unPlanned/request/receiptRequest.vue

@ -157,6 +157,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("计划外入库申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -168,7 +169,7 @@
}) })
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("计划外入库申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

1
src/pages/unPlanned/request/receiptRequestCreate.vue

@ -56,7 +56,6 @@
import { import {
goHome, goHome,
updateTitle,
getRemoveOption, getRemoveOption,
getISODateTime, getISODateTime,
navigateBack, navigateBack,

4
src/static/config.js

@ -1,5 +1,5 @@
// let request_url = "http://dev.ccwin-in.com:25300/api/admin-api" let request_url = "http://dev.ccwin-in.com:25300/api/admin-api"
let request_url = "http://192.168.0.128:12080/admin-api" // let request_url = "http://192.168.0.113:12080/admin-api"
let isDevelopment = true let isDevelopment = true

Loading…
Cancel
Save