niexiting 9 months ago
parent
commit
278b218452
  1. 13
      api/request2.js
  2. 49
      common/directory.js
  3. 4
      common/record.js
  4. 4
      mycomponents/item/itemQty.vue
  5. 34
      mycomponents/popup/selectList.vue
  6. 4
      mycomponents/record/recordComDetailCard.vue
  7. 8
      mycomponents/scan/winComScan.vue
  8. 101
      mycomponents/scan/winScanItem.vue
  9. 104
      mycomponents/scan/winScanPackAndLocation.vue
  10. 2
      mycomponents/scan/winScanPackAndPosition.vue
  11. 10
      mycomponents/workStation/workStation.vue
  12. 2
      pages/container/coms/comPalletRecord.vue
  13. 4
      pages/count/coms/comCountDetailCard.vue
  14. 2
      pages/customerReturn/coms/comReturnRecord.vue
  15. 75
      pages/customerReturn/request/customerReturnRequestCreate.vue
  16. 11
      pages/deliver/coms/comDeliverRequestPopup.vue
  17. 13
      pages/deliver/coms/comScanDeliverPack.vue
  18. 5
      pages/deliver/job/deliverDetail.vue
  19. 2
      pages/index/index.vue
  20. 2
      pages/inventoryMove/coms/comMoveRecordCard.vue
  21. 23
      pages/issue/coms/comIssueDetailCard.vue
  22. 2
      pages/issue/coms/comIssueRequestCreator.vue
  23. 180
      pages/issue/coms/comIssueRequestPopup.vue
  24. 13
      pages/issue/coms/comScanIssuePack.vue
  25. 15
      pages/issue/job/issueDetail.vue
  26. 62
      pages/issue/record/issueRecord.vue
  27. 48
      pages/issue/request/issueRequestCreate.vue
  28. 4
      pages/productPutaway/coms/comPutawayRequestCard.vue
  29. 2
      pages/productPutaway/request/putawayRequest.vue
  30. 4
      pages/productPutaway/request/putawayRequestDetail.vue
  31. 14
      pages/productionReturn/coms/comReturnCommonRequest.vue
  32. 2
      pages/productionReturn/coms/comReturnRecord.vue
  33. 64
      pages/productionReturn/coms/comReturnRequestPopup.vue
  34. 13
      pages/productionReturn/record/returnToStore.vue
  35. 22
      pages/productionReturn/request/returnRequestCreate.vue
  36. 2
      pages/purchaseReturn/record/returnRecord.vue
  37. 3
      pages/purchaseReturn/request/returnRequestCreate.vue
  38. 2
      pages/query/container.vue
  39. 2
      pages/query/item.vue
  40. 2
      pages/query/item_copy.vue
  41. 41
      pages/repleinsh/coms/comRepleinshRequestPopup.vue
  42. 2
      pages/repleinsh/coms/comRepleishDetailCard.vue
  43. 13
      pages/repleinsh/coms/comScanReplishPack.vue
  44. 39
      pages/repleinsh/job/repleinshDetail.vue
  45. 12
      pages/repleinsh/record/repleinshRecord.vue
  46. 2
      pages/repleinsh/request/repleinshRequest.vue
  47. 2
      pages/scrap/request/scrapRrequest.vue
  48. 2
      pages/unPlanned/coms/comReceiptRecord.vue
  49. 62
      pages/unPlanned/coms/comReceiptRequestPopup.vue
  50. 2
      pages/unPlanned/request/issueRequest.vue
  51. 2
      pages/unPlanned/request/receiptRequest.vue
  52. 18
      pages/unPlanned/request/receiptRequestCreate.vue
  53. 4
      router/index.js

13
api/request2.js

@ -96,6 +96,19 @@ export function updateUserPwd(oldPassword, newPassword) {
})
}
/**
* 获取仓库代码
* @param {*}
*
*/
export function getWarehouseCodeList(pageNo,pageSize) {
return request({
url: baseApi + "/wms/warehouse/page?pageNo="+pageNo+"&pageSize="+pageSize,
method: "get",
data: {},
});
}
/**
* 获取消息列表
* @param {*}

49
common/directory.js

@ -1,5 +1,6 @@
let jobStatusList = [];
let itemStatusList = [];
let itemTypeList =[];
let locationTypeList = [];
let uomList = [];
let inventoryStatusList = [];
@ -39,6 +40,7 @@ export function getBusinessTypeDesc(type) {
export function clearCacheData() {
jobStatusList = [];
itemStatusList = [];
itemTypeList =[];
locationTypeList = [];
uomList = [];
inventoryStatusList = [];
@ -143,16 +145,57 @@ export function getJobStateStyle(value) {
}
}
//获取库位描述
export function getListLocationTypeDesc(lst) {
//获取库位描述(多个库位)
export function getListLocationTypeDesc(list) {
let desc = '';
lst.forEach(res => {
list.forEach(res => {
desc += getLocationTypeInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取物品状态(多个状态)
export function getListItemStateDesc(list) {
let desc = '';
list.forEach(res => {
desc += getItemStateInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取物品类型(多个)
export function getListItemTypeDesc(list) {
let desc = '';
list.forEach(res => {
desc += getItemTypeInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取物品类型
export function getItemTypeInfo(value) {
var resultInfo = "";
if (itemTypeList.length == 0) {
itemTypeList = getDirectoryInfo("item_type")
}
if (itemTypeList.length > 0) {
for (let item of itemTypeList) {
if (item.value == value) {
resultInfo = item
break;
}
}
}
return resultInfo
}
//获取物品状态
export function getItemStateInfo(value) {
var resultInfo = "";

4
common/record.js

@ -58,6 +58,8 @@ export function getBusinessType(typeCode, callback) {
businessType: '',
fromlocationTypeList: '',
tolocationTypeList: '',
itemCodeTypeList:"",
useOnTheWay:"FALSE",
fromInventoryStatuses: '',
toInventoryStatuses: '',
message: ''
@ -67,8 +69,10 @@ export function getBusinessType(typeCode, callback) {
result.businessType = res.data.list[0];
result.fromlocationTypeList = getDirectoryItemArray(res.data.list[0].outLocationTypes)
result.tolocationTypeList = getDirectoryItemArray(res.data.list[0].inLocationTypes)
result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes)
result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses;
result.toInventoryStatuses = res.data.list[0].inInventoryStatuses;
result.useOnTheWay =res.data.list[0].useOnTheWay
callback(result)
} else {
result.success = false;

4
mycomponents/item/itemQty.vue

@ -6,7 +6,7 @@
<view>
<!-- showBalanceQty -->
<balanceQty v-if="showItemQty" :dataContent="dataContent"></balanceQty>
<balanceQty v-if="isShowBalanceQty" :dataContent="dataContent"></balanceQty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack">
</compare-qty>
@ -45,7 +45,7 @@
type: Number,
default: 0
},
showItemQty: {
isShowBalanceQty: {
type: Boolean,
default: true
},

34
mycomponents/popup/selectList.vue

@ -1,28 +1,31 @@
<template>
<uni-popup ref="popupItems">
<com-popup @onClose="closePopup">
<view class="">
<view class="uni-center" style="font-size: 40rpx;margin-top: 10rpx;margin-bottom: 10rpx;">
<view class="uni-center" style="position: relative;height:900rpx ;">
<view class="" style="position: absolute;font-size: 38rpx;height: 50rpx; margin-top: 10rpx;margin-bottom: 10rpx;left: 0;top: 0;right: 0;">
选择物料
</view>
<u-line/>
<view style="margin: 20rpx;" v-for="(item, index) in showList" :key="index" >
<view class="" style="padding: 10rpx;" @click="selectItem(item)">
物料: {{item.itemCode}}
<view class="" style="position: absolute;height: 720rpx; font-size: 40rpx;top: 70rpx;bottom: 80rpx;left: 0;right: 0;">
<view style="margin: 15rpx;text-align: left;" v-for="(item, index) in showList" :key="index" >
<view class="" style="padding: 10rpx;font-size: 30rpx; " @click="selectItem(item)">
({{index+1}}) 物料: {{item.itemCode}}
</view>
<u-line/>
</view>
<u-line/>
</view>
</view>
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" >
<view class="">
当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }}
<view class="" style="position: absolute; height:80rpx ;left: 0;bottom: 0;right: 0;">
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" >
<view class="">
当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }}
</view>
</view>
<view class="">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
</view>
</view>
</view>
<view class="">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
</view>
</com-popup>
</uni-popup>
@ -31,7 +34,6 @@
<script>
import {
getProductionlineItem,
getCustomerItemList
} from '@/api/request2.js';
import comPopup from '@/mycomponents/common/comPopup.vue'

4
mycomponents/record/recordComDetailCard.vue

@ -6,7 +6,7 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true" :showBalanceQty="isShowItemQty"></item-qty>
:isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
</template>
@ -86,7 +86,7 @@
default: true
},
isShowItemQty: {
isShowBalanceQty: {
type: Boolean,
default: false
},

8
mycomponents/scan/winComScan.vue

@ -141,13 +141,19 @@
// })
let that = this;
let index = that.scanMsg.indexOf('\n');
if (index > 0) {
if (index >= 0) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
that.losefocus();
let content = uni.$u.trim(that.scanMsg)
if (content == "") {
that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) {
that.scanMsg=""
that.getfocus();
}
})
return;
}

101
mycomponents/scan/winScanItem.vue

@ -13,29 +13,40 @@
</view>
<view class="">
<view class="">
<win-com-scan ref="scan" @getResult="getScanResult"
:placeholder='title'
:clearResult="false"
headerType="HMQ,HPQ">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false"
headerType="HMQ,HPQ">
</win-com-scan>
</view>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getBasicItemByCode
} from '@/api/request2.js';
import {
checkDirectoryItemExist,
getListItemTypeDesc,
getItemTypeInfo
} from '@/common/directory.js';
import winComScan from '@/mycomponents/scan/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
export default {
name: 'winScanItem',
components: {
winComScan
winComScan,
comMessage
},
emits: ["getScanCode",'getScanResult'],
emits: ["getScanCode", 'getScanResult'],
props: {
title: {
type: String,
@ -44,7 +55,11 @@
isShowRecord: {
type: Boolean,
default: true
}
},
itemCodeTypeList: {
type: Array,
default: []
},
},
data() {
return {
@ -80,22 +95,76 @@
this.$refs.scan.clearScanValue();
},
getScanResult(result) {
this.result = result;
if (result.label.barType == "QRCode") {
this.code = result.label.itemCode;
} else if (result.label.barType == "BarCode") {
this.code = result.label.code;
uni.showLoading({
title: '扫描中...',
mask: true
});
var scanResult = result;
if (scanResult.label.barType == "QRCode") {
this.code = scanResult.label.itemCode;
} else if (scanResult.label.barType == "BarCode") {
this.code = scanResult.label.code;
}
if (this.code == undefined) {
uni.hideLoading();
this.showErrorMessage("扫描物料[" + this.code + "]为空,请输入正确的物料")
return
}
this.callBack();
getBasicItemByCode(this.code).then(res => {
uni.hideLoading();
if (res.data != null && res.data.list.length > 0) {
var result =res.data.list[0];
var status =result.status;
var type = result.type;
var itemCode = result.code
var itemName =result.name
var uom = result.uom
var std = result.uom
result.package = scanResult.package
if(status=="ENABLE"){
if(checkDirectoryItemExist(this.itemCodeTypeList,type)){
this.result =result;
this.callBack()
}else {
var hint = getListItemTypeDesc(this.itemCodeTypeList);
this.showErrorMessage("扫描物料[" + this.code + "]是[" +
getItemTypeInfo(type).label + "],需要的物料类型是[" + hint + "]")
}
}else {
this.showErrorMessage('物料【' + this.code + '】不可用');
}
} else {
this.showErrorMessage('未查找到物料【' + this.code + '】');
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error)
})
},
callBack() {
this.closeScanPopup();
this.$refs.scan.clear();
this.$emit("getScanCode", this.code);
// this.$emit("getScanCode", this.code);
this.$emit("getScanResult", this.code, this.result);
},
change(e) {
this.isShow = e.show
}
},
showErrorMessage(message) {
this.losefocus();
this.$refs.comMessage.showErrorMessage(message, res => {
this.code = '';
this.getfocus();
})
},
getfocus() {
this.$refs.scan.getfocus();
},
losefocus() {
this.$refs.scan.losefocus();
},
}
}
</script>

104
mycomponents/scan/winScanPackAndLocation.vue

@ -28,7 +28,7 @@
<view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位"
@confirm="scanLocation" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
@confirm="" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view>
<view v-else>
<text style="padding: 5px">
@ -121,7 +121,8 @@
businessType: {},
inventoryStatus: [],
managementPrecision: '',
fromInventoryStatuses: ""
fromInventoryStatuses: "",
isCheck:false
}
},
created() {
@ -167,20 +168,30 @@
this.$emit("close", '');
},
scanLocation() {
scanLocation(scanResult) {
var isCheck = false;
if (this.fromLocationCode == '') {
this.showMessage('来源库位不能为空', callback => {
this.showErrorMessage('来源库位不能为空', callback => {
this.locationGetFocus();
})
return;
}
if(this.fromLocationList.length>0){
if(!this.isInLocationList(this.fromLocationCode)){
this.showErrorMessage("扫描库位【"+this.fromLocationCode+'】不在任务来源库位中', callback => {
this.locationGetFocus();
})
return;
}
}
uni.showLoading({
title: '扫描中...',
mask: true
});
getBasicLocationByCode(this.fromLocationCode).then(res => {
uni.hideLoading();
if (res.data.total > 0) {
let result = res.data.list[0];
var type = result.type;
@ -188,8 +199,10 @@
if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) {
this.location = result;
this.packGetFocus();
// this.packGetFocus();
this.checkPackage(scanResult);
} else {
uni.hideLoading();
var hint = getListLocationTypeDesc(this.fromLocationTypeArray);
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" +
getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => {
@ -197,11 +210,13 @@
})
}
} else {
uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus();
})
}
} else {
uni.hideLoading();
this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']', res => {
this.locationGetFocus();
})
@ -214,36 +229,45 @@
})
},
getScanResult(result) {
console.log("扫描", result)
if (this.fromLocationCode == '' || this.fromLocationCode == null) {
this.showMessage('请先扫描来源库位', callback => {
this.locationGetFocus();
})
return;
} else {
if (result.label != null) {
this.scanResult = result;
// uni.showLoading({
// title: '...',
// mask: true
// })
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
res => {
if (res.success) {
this.managementPrecision = res.managementPrecision
this.afterQueryBalance(res.data.list);
} else {
this.showErrorMessage(res.message, res => {
this.packGetFocus();
})
}
// uni.hideLoading();
});
}
getScanResult(result) {
// console.log("", result)
// if (this.fromLocationCode == '' || this.fromLocationCode == null) {
// this.showMessage('', callback => {
// this.locationGetFocus();
// })
// return;
// } else
this.scanLocation(result);
// debugger
// if(this.isCheck){
// this.checkPackage(result);
// }
},
checkPackage(result){
if (result.label != null) {
this.scanResult = result;
// uni.showLoading({
// title: '...',
// mask: true
// })
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
res => {
uni.hideLoading();
if (res.success) {
this.managementPrecision = res.managementPrecision
this.afterQueryBalance(res.data.list);
} else {
this.showErrorMessage(res.message, res => {
this.packGetFocus();
})
}
// uni.hideLoading();
});
}
},
afterQueryBalance(datas) {
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
@ -400,6 +424,20 @@
change(e) {
this.show = e.show
},
isInLocationList(location) {
var item = this.fromLocationList.find(res => res == location)
if (item = undefined) {
return false
}
return true
},
addLocationCode(code) {
if (!this.isInLocationList(code)) {
this.fromLocationList.push(code)
}
}
}
}
</script>

2
mycomponents/scan/winScanPackAndPosition.vue

@ -112,7 +112,7 @@
},
initData(){
this.positionInfo= "请选择位置";
this.positionInfo = "请选择位置";
this.positionList = [];
this.productionLineCode = '';
this.rawLocationCode = "";

10
mycomponents/workStation/workStation.vue

@ -2,6 +2,11 @@
<view class="header_job_top">
<view class="cen_card">
<view class="cell_box uni-flex uni-row">
<view class="cell_info" v-if="fromWarehouseCode!=''">
<view class="text_lightblue">仓库</view>
<view>{{fromWarehouseCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">车间</view>
<view>{{workshopCode}}</view>
@ -37,6 +42,11 @@
watch: {},
props: {
fromWarehouseCode:{
type: String,
default: ""
},
workshopCode: {
type: String,
default: ""

2
pages/container/coms/comPalletRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
<item-qty :dataContent="dataContent"
:isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>

4
pages/count/coms/comCountDetailCard.vue

@ -6,10 +6,10 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty v-if="settingParam.isOpenCount=='TRUE'" :dataContent="dataContent"
:handleQty="dataContent.handleQty" :showBalanceQty="true">
:handleQty="dataContent.handleQty" :isShowBalanceQty="true">
</item-qty>
<item-qty v-else :dataContent="dataContent" :handleQty="dataContent.handleQty"
:showBalanceQty="false" :showRecommendQty="false" :showStdPack="true">
:isShowBalanceQty="false" :showRecommendQty="false" :showStdPack="true">
</item-qty>
</uni-swipe-action-item>
</uni-swipe-action>

2
pages/customerReturn/coms/comReturnRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
<item-qty :dataContent="dataContent"
:isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>

75
pages/customerReturn/request/customerReturnRequestCreate.vue

@ -1,13 +1,13 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='getLocation' v-if="detailSource.length==0"></com-blank-view>
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="uni-flex uni-row padding title u-col-center" @click="showSelect">
<text>客户 : </text>
<view class="uni-flex uni-row padding title u-col-center" @click="showSelect" style="font-size: 35rpx;">
<text style="font-size: 32rpx;">客户 : </text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 20rpx;">
<view class="" style="margin-left: 20rpx;font-size: 32rpx;">
{{customerName}}
</view>
<u-select v-model="showCustomer" mode="single-column" :list="customerList" @confirm="confirmSelect">
@ -17,13 +17,12 @@
<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="">
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true"
:isShowToLocation="false" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
:isShowBalanceQty="false" :isShowToLocation="false" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
</view>
@ -56,7 +55,9 @@
</template>
<script>
import { calc } from '@/common/calc'
import {
calc
} from '@/common/calc'
import {
customerReturnRequestSubmit,
getBasicCustomerList
@ -72,6 +73,7 @@
import {
goHome,
updateTitle,
deepCopyData,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
@ -270,10 +272,10 @@
},
commit() {
// if (this.toLocationCode == "") {
// this.showMessage("")
// return;
// }
if (this.customerName == ""||this.customerName == "请选择退货客户") {
this.showErrorMessage("请选择退货客户")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
@ -329,40 +331,47 @@
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.customerCode = 'CF';
this.dataContent.fromWarehouseCode = this.fromLocation.warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
var submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = 'HOLD';
submitItem.inventoryStatus = detail.inventoryStatus;
submitItem.toInventoryStatus = 'HOLD';
detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = detail.packingNumber;
submitItem.fromPackingNumber = detail.packingNumber;
submitItem.toPackingNumber = detail.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = detail.batch;
detail.toBatch = detail.batch;
submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = 'HOLD';
submitItem.qty = detail.handleQty;
subList.push(detail)
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = 'HOLD';
submitItem.package = ""
subList.push(submitItem)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.customerCode = this.customerCode;
this.dataContent.fromWarehouseCode = this.fromLocation.warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent;
},
@ -415,6 +424,8 @@
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
this.customerName ="请选择退货客户"
this.customerCode =""
},
updateData() {

11
pages/deliver/coms/comDeliverRequestPopup.vue

@ -42,7 +42,7 @@
<text>数量 : </text>
<view class="uni-flex uni-row uni-center"
style="align-items: center;margin-left: 20rpx;">
<input style="text-align: center;" class="qty_input" v-model="qty" type="number"
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
<uom :uom="uom"></uom>
@ -104,7 +104,7 @@
requestInfo: null,
itemCodeList: [],
isCheckItemCode: false,
counQty: 0,
counQty: undefined,
editPosition: true,
numberFocus: false,
uom: "",
@ -162,7 +162,7 @@
this.itemCode = "";
this.uom = ""
this.qty = 0
this.counQty =0;
this.counQty =undefined;
this.itemCodeGetFocus();
}
@ -200,6 +200,11 @@
this.showErrorMessage("请输入物料", "itemCode")
return
}
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) {
this.showErrorMessage("数量必须大于0")
return

13
pages/deliver/coms/comScanDeliverPack.vue

@ -3,10 +3,17 @@
<uni-popup ref="popup" :maskClick='false'>
<view class="">
<view class="popup_box">
<view class="pop_title">
扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text>
<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;

5
pages/deliver/job/deliverDetail.vue

@ -224,7 +224,7 @@
})
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
if (locationCode == null) {
this.submitJob();
} else {
//
@ -280,8 +280,7 @@
record.supplierCode = r.supplierCode;
//使
if (this.jobContent.useOnTheWayLocation ==
'TRUE') {
if (this.toLocationCode ==null) {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;

2
pages/index/index.vue

@ -317,7 +317,7 @@
},
getDictory() {
var params = {
types: ["job_status", "location_type", "item_status", "uom",
types: ["job_status", "location_type", "item_status","item_type","uom",
"inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason",
"unplanned_issue_reason", "scrap_reason", "inspect_failed_reason",
"request_status", "inspect_type", "next_action", "sample_method", "transfer_mode",

2
pages/inventoryMove/coms/comMoveRecordCard.vue

@ -6,7 +6,7 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent"
:showBalanceQty="false"
:isShowBalanceQty="false"
:isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>

23
pages/issue/coms/comIssueDetailCard.vue

@ -8,7 +8,12 @@
<uni-collapse-item :open="true">
<template v-slot:title>
<!-- 物品 -->
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
:right-options="removeOptions">
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
</com-issue-request-info> -->
</template>
@ -68,11 +73,12 @@
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import {
getDetailOption,
getEditRemoveOption
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData'],
emits: ['updateData',"removeItemCode"],
components: {
itemQty,
recommend,
@ -107,13 +113,15 @@
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: []
scanOptions: [],
removeOptions:[]
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {
@ -135,6 +143,13 @@
this.remove(batch, record, index)
}
},
itemCoceClick(e,item,index){
if (e.content.text == "移除") {
this.dataContent.Items.splice(index, 1);
this.$emit('removeItemCode')
}
},
edit(batch, item) {
let that = this;

2
pages/issue/coms/comIssueRequestCreator.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-column">
<!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
</com-issue-request-info> -->
<work-station :workshopCode="dataContent.workShopCode" :productionLineCode="dataContent.productionLineCode"
<work-station :fromWarehouseCode="dataContent.fromWarehouseCode" :workshopCode="dataContent.workshopCode" :productionLineCode="dataContent.productionLineCode"
:workStationCode="dataContent.workStationCode" :rawLocationCode="dataContent.toLocationCode"></work-station>
<uni-swipe-action ref="swipeAction">

180
pages/issue/coms/comIssueRequestPopup.vue

@ -13,6 +13,18 @@
<u-line />
<view class="uni-flex uni-column" style="background-color: white; ">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row padding title u-col-center">
<text>从仓库代码</text>
<view class="uni-flex u-col-center uni-row" @click="showWarseHouseSelect">
<view class="" style="margin-left: 20rpx;width: 100% ">
{{fromWarehouseCode}}
</view>
<u-select v-model="showWareHouse" mode="single-column" :list="wareHouseList"
@confirm="confirmWareHouse"></u-select>
</view>
</view>
<u-line />
<view class="uni-flex uni-row padding title u-col-center">
<text>位置</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
@ -36,18 +48,20 @@
</image>
</view>
</view>
<u-line />
<view class="uni-flex uni-row padding title u-col-center">
<text>数量 </text>
<view class="uni-flex uni-row uni-center"
style="display: flex; align-items: center;margin-left: 20rpx;justify-content: center;">
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
@confirm="confirm()" :focus="numberFocus" @input="checkNum"
:maxlength="maxlength" />
<uom :uom="uom"></uom>
<view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;">
<view class="" v-if="stdPackInfo!=undefined"
style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>)
</view>
</view>
@ -62,7 +76,8 @@
</view>
</view>
</uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult'>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult'
:itemCodeTypeList="itemCodeTypeList">
</win-scan-item>
<comMessage ref="comMessage"></comMessage>
</view>
@ -73,7 +88,8 @@
getBasicLocationByCode,
getBasicItemByCode,
getProductionlineItem,
getWorkShopLineStation
getWorkShopLineStation,
getWarehouseCodeList
} from '@/api/request2.js';
import {
getLocationTypeName,
@ -86,18 +102,16 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue'
export default {
components: {
uom,
balanceStatus,
comMessage,
winScanItem,
stdPackQty
stdPackQty,
},
data() {
return {
// itemCode: 'CE115F11161AG',
workshopCode: "", //
workShopName: "",
productionLineCode: "", //线
@ -105,6 +119,7 @@
workStationCode: "", //
workStationName: "",
itemCode: '请扫描物料信息',
fromWarehouseCode: "请选择仓库代码",
itemName: "",
qty: 0,
rawLocationCode: "",
@ -112,7 +127,6 @@
itemCodeFocus: false,
requestInfo: null,
itemCodeList: [],
isCheckItemCode: false,
counQty: undefined,
editPosition: true,
numberFocus: false,
@ -122,8 +136,10 @@
isModifiedPosition: true,
positionList: [],
stdQty: 0, //
maxlength:10,
stdPackInfo:undefined
maxlength: 10,
stdPackInfo: undefined,
wareHouseList: [],
showWareHouse: false
}
},
props: {
@ -131,6 +147,10 @@
type: String,
default: '需求信息'
},
itemCodeTypeList: {
type: Array,
default: []
},
},
methods: {
checkNum(e) {
@ -140,7 +160,7 @@
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
@ -151,19 +171,28 @@
openRequestPopup(editPosition) {
if (this.positionList.length == 0) {
getWorkShopLineStation().then(res => {
this.positionList = res.data
}).catch(error => {
if (res.data != null && res.data.length > 0) {
this.positionList = res.data
} else {
this.showErrorMessage('未查找到位置信息');
}
}).catch(error => {
this.showErrorMessage(error);
})
}
this.editPosition = editPosition;
if (this.isModifiedPosition) {
this.isModifiedPosition = false
} else {
this.itemCode = "";
this.itemCode = "请扫描物料信息";
this.show = false
this.showWareHouse = false
this.uom = ""
this.qty = 0;
this.stdPackInfo = undefined;
this.counQty = undefined;
this.numberFocus = false
this.itemCodeGetFocus();
@ -171,6 +200,29 @@
this.$refs.popup.open('bottom')
},
initData() {
this.positionList = [];
this.wareHouseList= [],
this.showWareHouse = false
this.editPosition =true;
this.itemCode = "请扫描物料信息";
this.rawLocationCode = ""
this.positionInfo = "请选择位置"
this.fromWarehouseCode = "请选择仓库代码"
this.workshopCode = "" //
this.workShopName = ""
this.productionLineCode = "" //线
this.productionLineName = ""
this.workStationCode = "" //
this.workStationName = ""
this.show = false
this.uom = ""
this.qty = 0;
this.stdPackInfo = undefined;
this.counQty = undefined;
this.numberFocus = false
},
closeRequestPopup() {
this.$refs.popup.close()
},
@ -188,13 +240,20 @@
itemCodeLoseFocus() {
this.itemCodeFocus = false;
},
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) {
if (this.positionInfo == "请选择位置") {
this.showErrorMessage("请选择位置")
return
}
if (this.fromWarehouseCode == "请选择仓库代码") {
this.showErrorMessage("请选择仓库代码")
return
}
if (this.itemCode == "请扫描物料信息") {
this.showErrorMessage("请输入物料", "itemCode")
return
}
@ -202,7 +261,7 @@
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) {
this.showErrorMessage("数量必须大于0")
return
@ -215,28 +274,6 @@
this.callback('add');
},
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.scanPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
this.showErrorMessage('未查找到物料【' + itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) {
let item = {
positionInfo: this.positionInfo,
@ -248,6 +285,8 @@
workStationName: this.workStationName,
rawLocationCode: this.rawLocationCode,
fgLocationCode: this.fgLocationCode,
fromWarehouseCode: this.fromWarehouseCode,
toWarehouseCode: this.fromWarehouseCode,
itemCode: this.itemCode,
itemName: this.itemName,
uom: this.uom,
@ -267,8 +306,7 @@
}
})
if (type == "itemCode") {
this.itemCode = ""
this.isCheckItemCode = false;
this.itemCode = "请扫描物料信息"
}
})
},
@ -282,8 +320,14 @@
if (this.editPosition) {
this.show = true
}
},
showWarseHouseSelect() {
if (this.editPosition) {
this.wareHouseClick();
}
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo)
@ -315,14 +359,42 @@
},
getItemScanResult(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
this.itemCode = code;
this.itemName = scanResult.name
this.uom = scanResult.uom
this.stdPackInfo = scanResult.package;
}
this.numberFocus = true
},
wareHouseClick() {
uni.showLoading({
title: "查询中....",
mask: true
});
getWarehouseCodeList(1, 100).then(res => {
uni.hideLoading()
if (res.data != null && res.data.list.length > 0) {
res.data.list.forEach(item => {
item.value = item.code;
item.label = item.name;
})
this.wareHouseList = res.data.list
this.showWareHouse = true
} else {
this.showErrorMessage('未查找到仓库代码');
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error);
})
},
confirmWareHouse(e) {
this.fromWarehouseCode = e[0].value;
},
}
}
</script>

13
pages/issue/coms/comScanIssuePack.vue

@ -3,9 +3,16 @@
<uni-popup ref="popup" :maskClick='false'>
<view class="">
<view class="popup_box">
<view class="pop_title">
扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text>
<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;

15
pages/issue/job/issueDetail.vue

@ -20,15 +20,18 @@
</view>
</scroll-view>
</view>
<div class="btn_bottom">
<view class="" style="display: flex;flex-direction: row;">
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<!-- <button class="btn_commit" hover-class="btn_commit_after" @click="resizeCollapse()">刷新UI</button> -->
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
</div>
</view>
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button>
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
</com-scan-issue-pack>

62
pages/issue/record/issueRecord.vue

@ -16,27 +16,36 @@
:rawLocationCode="toLocation.toLocationCode"></work-station>
</view>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'>
@updateData='updateData'
@removeItemCode ="removeItemCode"
>
</com-issue-detail-card>
</view>
</scroll-view>
<button class="btn_add" @click="goScan(true)">+去添加</button>
<button class="btn_add" @click="goScan(false)">+去添加</button>
</view>
<div class="btn_bottom">
<view class="" style="display: flex;flex-direction: row;">
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
</div>
</view>
</view>
</view>
<com-message ref="comMessage"></com-message>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm' :itemCodeTypeList="itemCodeTypeList"></com-issue-request-popup>
<win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button>
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
</com-scan-issue-pack>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
@ -104,7 +113,8 @@
toInventoryStatuses: "",
requestList: [],
dataContent: {},
managementList: []
managementList: [],
itemCodeTypeList: []
}
},
mounted() {
@ -120,7 +130,7 @@
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.itemCodeTypeList = res.itemCodeTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses
@ -143,6 +153,7 @@
});
},
goScan(editPosition) {
this.$refs.comIssueRequestPopup.openRequestPopup(editPosition);
},
@ -182,7 +193,6 @@
if (res.data == null) {
that.showMessage('未获取到推荐信息');
} else {
if (res.data.length > 0) {
that.workShopCode = item.workshopCode;
res.data.forEach(r => {
@ -190,7 +200,8 @@
r.productionLineCode = item.productionLineCode;
r.workStationCode = item.workStationCode;
// r.itemCode = item.itemCode;
// r.uom = item.uom;
r.itemName = item.itemName
r.uom = item.uom;
that.subList.push(r);
})
that.detailSource = getDataSource(that.detailSource, that.subList)
@ -262,6 +273,14 @@
// item.handleQty=itemHandleQty;
// this.closeScan();
},
removeItemCode(){
var isClear =this.detailSource[0].Items.length==0
if(isClear){
this.clearData();
this.$refs.comIssueRequestPopup.initData()
}
},
setParams() {
var subList = []
@ -355,13 +374,12 @@
submitJob() {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败:" + res.msg)
this.showErrorMessage("提交失败:" + res.msg+"】")
}
}).catch(error => {
uni.hideLoading()
@ -372,14 +390,20 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
this.$refs.comIssueRequestPopup.initData()
})
},
clearData() {
this.detailSource = [];
this.requestList = [];
this.dataContent = {}
this.managementList = []
this.subList= [], //subList
this.detailSource=[], //
this.detailOptions=[],
this.scanOptions= [],
this.workShopCode="",
this.requestList= [],
this.dataContent= {},
this.managementList= []
},
showMessage(message) {

48
pages/issue/request/issueRequestCreate.vue

@ -9,21 +9,23 @@
</comIssueRequestCreator>
<button class="btn_add" @click="goScan(false)">+去添加</button>
</view>
<div class="btn_bottom">
<view class="" style="display: flex;flex-direction: row;">
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
</div>
</view>
<com-scan-issue-pack ref="comScanIssuePack">
</com-scan-issue-pack>
<comMessage ref="comMessage"></comMessage>
</view>
</view>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm' :itemCodeTypeList="itemCodeTypeList" ></com-issue-request-popup>
</template>
<script>
@ -34,11 +36,16 @@
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
updateTitle,
getRemoveOption,
navigateBack,
getCurrDateOneMonthsTimes
} from '@/common/basic.js';
@ -73,14 +80,27 @@
detailOptions: [],
scanOptions: [],
requestList: [], //
itemCodeTypeList:[],
useOnTheWay:"FALSE"
}
},
mounted() {
this.goScan(true)
},
onLoad(option) {
var typeCode = "Issue"
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.useOnTheWay = res.useOnTheWay;
this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
},
methods: {
@ -93,13 +113,15 @@
if (this.detailSource.subList.length == 0) {
this.detailSource = {
workShopCode: item.workshopCode,
workshopCode: item.workshopCode,
workShopName: item.workShopName,
productionLineCode: item.productionLineCode,
productionLineName: item.productionLineName,
workStationCode: item.workStationCode,
workStationName: item.workStationName, //
toLocationCode: item.rawLocationCode,
fromWarehouseCode:item.fromWarehouseCode,
useOnTheWay:this.useOnTheWay,
totalQty: 0,
subList: []
}
@ -109,6 +131,8 @@
workStationCode: item.workStationCode,
itemCode: item.itemCode,
itemName: item.itemName,
toWarehouseCode:item.toWarehouseCode,
fromWarehouseCode:item.fromWarehouseCode,
qty: item.qty,
uom: item.uom
}
@ -127,6 +151,8 @@
workStationCode: item.workStationCode,
itemCode: item.itemCode,
itemName: item.itemName,
toWarehouseCode:item.toWarehouseCode,
fromWarehouseCode:item.fromWarehouseCode,
qty: item.qty,
uom: item.uom
}
@ -176,9 +202,7 @@
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({
url: './issueRequest'
})
navigateBack(1)
})
},
showErrorMessage(message) {

4
pages/productPutaway/coms/comPutawayRequestCard.vue

@ -1,9 +1,9 @@
<template>
<request-com-main-card :dataContent="dataContent">
<view class="task_item">
<view class="task_text">
<!-- <view class="task_text">
供应商代码 : {{dataContent.supplierCode}}
</view>
</view> -->
</view>
</request-com-main-card>
</template>

2
pages/productPutaway/request/putawayRequest.vue

@ -88,7 +88,7 @@
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndAddAndCloseOption = getDetailAndAddAndCloseOption()
},

4
pages/productPutaway/request/putawayRequestDetail.vue

@ -4,9 +4,9 @@
<view class="header_job_top">
<request-top :dataContent="requestContent"></request-top>
</view>
<view class="header_item">
<!-- <view class="header_item">
供应商 : {{requestContent.supplierCode}}
</view>
</view> -->
<u-line color="#D8D8D8" />
</view>
<view class="page-main">

14
pages/productionReturn/coms/comReturnCommonRequest.vue

@ -109,7 +109,7 @@
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndAddAndCloseOption = getDetailAndAddAndCloseOption()
this.updateTitle();
this.getList('refresh');
@ -241,25 +241,25 @@
swipeClick(e, dataContent) {
var text = clearTirmAndWrap(e.content.text)
if (e.content.text == "详情") {
if (text == "详情") {
this.openRequestInfoPopup(dataContent);
} else if (e.content.text == "处理") {
} else if (text == "处理") {
this.showQuestionMessage("确定要处理当前申请吗?", res => {
this.productionReturnRequestHandle(dataContent.id)
})
} else if (e.content.text == "审批") {
} else if (text == "提交审批") {
this.showQuestionMessage("确定要审批当前申请吗?", res => {
this.productionReturnRequestSubmitApprove(dataContent.id)
})
} else if (e.content.text == "审批通过") {
} else if (text == "审批通过") {
this.showQuestionMessage("确定要审批通过当前申请吗?", res => {
this.productionReturnRequestSubmitApproveAgree(dataContent.id)
})
} else if (e.content.text == "审批驳回") {
} else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?", res => {
this.productionReturnRequestSubmitApproveRefused(dataContent.id)
})
} else if (e.content.text == "关闭") {
} else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?", res => {
this.productionReturnRequestClose(dataContent.id)
})

2
pages/productionReturn/coms/comReturnRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :showBalanceQty="false" :isShowBalance="true"></item-qty>
<item-qty :dataContent="dataContent" :isShowBalanceQty="false" :isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>

64
pages/productionReturn/coms/comReturnRequestPopup.vue

@ -66,7 +66,7 @@
</view>
</view>
</uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList">
</win-scan-item>
<comMessage ref="comMessage"></comMessage>
</view>
@ -116,8 +116,7 @@
itemCodeFocus: false,
requestInfo: null,
itemCodeList: [],
isCheckItemCode: false,
counQty: 0,
counQty: undefined,
editPosition: true,
numberFocus: false,
uom: "",
@ -198,6 +197,10 @@
type: String,
default: '需求信息'
},
itemCodeTypeList: {
type: Array,
default: []
},
},
methods: {
checkNum(e) {
@ -228,9 +231,11 @@
if (this.isModifiedPosition) {
this.isModifiedPosition = false
} else {
this.itemCode = "";
this.itemCode = "请扫描物料信息";
this.uom = ""
this.qty = 0
this.qty = 0;
this.counQty = undefined
this.numberFocus = false
this.itemCodeGetFocus();
}
@ -253,16 +258,18 @@
itemCodeLoseFocus() {
this.itemCodeFocus = false;
},
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) {
if (this.itemCode == "请扫描物料信息" ) {
this.showErrorMessage("请输入物料", "itemCode")
return
}
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) {
this.showErrorMessage("数量必须大于0")
return
@ -275,28 +282,6 @@
this.callback('add');
},
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.scanPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
this.showErrorMessage('未查找到物料【' + this.itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) {
let item = {
positionInfo: this.positionInfo,
@ -327,8 +312,7 @@
}
})
if (type == "itemCode") {
this.itemCode = ""
this.isCheckItemCode = false;
this.itemCode = "请扫描物料信息"
}
})
},
@ -374,14 +358,12 @@
}
},
getScanCode(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
getItemScanResult(code, scanResult) {
this.itemCode = code;
this.itemName = scanResult.name
this.uom =scanResult.uom
this.stdPackInfo = scanResult.package;
this.numberFocus = true
},
}

13
pages/productionReturn/record/returnToStore.vue

@ -175,7 +175,16 @@
let label = result.label;
let pack = result.package;
if(label.batch==""){
this.showErrorMessage("扫描标签批次为空")
return;
}
if(label.packingNumber==""){
this.showErrorMessage("扫描标签箱码为空")
return;
}
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
@ -223,6 +232,7 @@
})
} else {
debugger
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
r.batch == label.batch) {
@ -235,6 +245,7 @@
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = toLocation.code;
newDetail.fromLocationCode = this.rawLocationCode;
newDetail.locationCode = this.rawLocationCode;
newDetail.toWarehouseCode = toLocation.warehouseCode;
item.subList.push(newDetail);
this.calcHandleQty();

22
pages/productionReturn/request/returnRequestCreate.vue

@ -23,13 +23,17 @@
<comMessage ref="comMessage"></comMessage>
</view>
</view>
<comReturnRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' title="申请信息"></comReturnRequestPopup>
<comReturnRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' title="申请信息" :itemCodeTypeList="itemCodeTypeList"></comReturnRequestPopup>
</template>
<script>
import {
productionReturnRequestCreate,
} from '@/api/request2.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
calc
@ -61,7 +65,6 @@
},
data() {
return {
jobContent: {}, //
subList: [], //subList
detailSource: {
subList: []
@ -70,13 +73,14 @@
scanOptions: [],
requestList: [], //
fromType: '',
title: ""
title: "",
itemCodeTypeList: []
}
},
mounted() {
this.goScan(true)
},
onLoad(option) {
this.fromType = option.fromType
@ -86,6 +90,16 @@
this.title = "生产隔离退料申请"
}
updateTitle(this.title)
var typeCode = this.fromType
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
},
methods: {

2
pages/purchaseReturn/record/returnRecord.vue

@ -286,7 +286,7 @@
submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch;
submitItem.fromLocationCode = this.fromLocationCode;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = ''; //退
submitItem.qty = detail.handleQty;

3
pages/purchaseReturn/request/returnRequestCreate.vue

@ -10,7 +10,8 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
@updateData="updateData" @removePack="removePack"
:isShowToLocation="false">
</record-com-detail-card>
</view>
</view>

2
pages/query/container.vue

@ -27,7 +27,7 @@
<win-scan-button @goScan='openScanPopup' v-if="containerNumber!=''"></win-scan-button>
<win-scan-item ref="scanPopup" title='器具代码' @getScanCode='getScanCode'>
<win-scan-item ref="scanPopup" title='器具代码' @getScanResult='getScanCode'>
</win-scan-item>
<show-modal ref="modal"></show-modal>
<comMessage ref="comMessage"></comMessage>

2
pages/query/item.vue

@ -27,7 +27,7 @@
</my-paging>
<win-scan-button @goScan='openScanPopup' v-if="itemCode!=''"></win-scan-button>
<win-scan-item ref="scanPopup" title='物料代码' @getScanCode='getScanCode'>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
</win-scan-item>
<comMessage ref="comMessage"></comMessage>
</view>

2
pages/query/item_copy.vue

@ -42,7 +42,7 @@
</view>
<win-scan-button @goScan='openScanPopup' v-if="itemCode!=''"></win-scan-button>
<win-scan-item ref="scanPopup" title='物料代码' @getScanCode='getScanCode'>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
</win-scan-item>
<comMessage ref="comMessage"></comMessage>
</view>

41
pages/repleinsh/coms/comRepleinshRequestPopup.vue

@ -64,7 +64,7 @@
</view>
</view>
</uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList">
</win-scan-item>
<win-scan-location ref="scanLocationPopup" title='目标库位' @getLocation='getLocationCode'
@ -115,12 +115,10 @@
rawLocationCode: "",
fgLocationCode: "",
itemCodeFocus: false,
isCheckItemCode: false,
counQty: 0,
counQty: undefined,
editPosition: true,
numberFocus: false,
uom: "",
positionInfo: "请选择位置",
show: false,
isModifiedPosition: true,
positionList: [],
@ -167,7 +165,11 @@
// this.qty = 0
// this.itemCodeGetFocus();
// }
this.qty = 0;
this.itemCode = '请扫描物料信息'
this.toLocationCode = '请扫目标库位'
this.counQty =undefined;
this.numberFocus = false
this.$refs.popup.open('bottom');
// this.showScanLocation();
},
@ -207,10 +209,21 @@
},
confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) {
if (this.toLocationCode == "请扫目标库位") {
this.showErrorMessage("请输入目标库位")
return
}
if (this.itemCode == "请扫描物料信息") {
this.showErrorMessage("请输入物料", "itemCode")
return
}
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) {
this.showErrorMessage("数量必须大于0")
return
@ -227,7 +240,6 @@
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
@ -261,14 +273,12 @@
this.closeRequestPopup();
},
getScanCode(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
getItemScanResult(code, scanResult) {
this.itemCode = code;
this.itemName = scanResult.name
this.uom =scanResult.uom
this.stdPackInfo = scanResult.package;
this.numberFocus = true
},
getLocationCode(location, code) {
@ -289,8 +299,7 @@
}
})
if (type == "itemCode") {
this.itemCode = ""
this.isCheckItemCode = false;
this.itemCode = "请扫描物料信息"
}
})
},

2
pages/repleinsh/coms/comRepleishDetailCard.vue

@ -8,7 +8,7 @@
<uni-collapse-item :open="true" :show-animation="true">
<template v-slot:title>
<!-- 物品 -->
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
<item-qty :dataContent="item" :handleQty="item.handleQty" :isShowBalanceQty="false" ></item-qty>
</template>
<u-line />
<view v-for="(loacation,index) in item.Locations">

13
pages/repleinsh/coms/comScanReplishPack.vue

@ -393,6 +393,19 @@
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
this.dataContent.forEach(toLocationCode=>{
toLocationCode.Items.forEach(item=>{
var itemCodeHandleQty =0;
item.Locations.forEach(batch=>{
batch.Batchs.forEach(batchHandleQty=>{
itemCodeHandleQty=calc.add(itemCodeHandleQty,batchHandleQty.handleQty)
})
})
item.handleQty=itemCodeHandleQty;
})
})
},
addRecord(batch, label, balance, packageInfo) {

39
pages/repleinsh/job/repleinshDetail.vue

@ -11,7 +11,7 @@
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="">
<scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource">
<com-repleish-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'>
@ -213,15 +213,30 @@
submit() {
var scanCount = this.getScanCount(this.subList);
if (scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
//
if(this.jobContent.allowPartialComplete=="TRUE"){
// 00
if(scanCount == 0){
this.$refs.comMessage.showQuestionMessage("扫描数为0,是否提交?",res=>{
if(res){
this.setSubmitParamsAndSubmit();
}
})
}else {
this.setSubmitParamsAndSubmit();
}
}else {
//
if(scanCount == 0){
this.showErrorMessage("扫描数为0,当前补料任务不允许部分提交,请先扫描")
}else {
this.setSubmitParamsAndSubmit();
}
}
uni.showLoading({
title: "提交中....",
mask: true
});
},
setSubmitParamsAndSubmit(){
//
var itemCodes = []
let locationCode = this.toLocationCode
@ -230,7 +245,7 @@
itemCodes.push(item.itemCode)
})
})
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.submitJob();
@ -249,6 +264,10 @@
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));

12
pages/repleinsh/record/repleinshRecord.vue

@ -33,7 +33,8 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<com-repleinsh-request-popup ref="comRepleinshRequestPopup" :toLocationTypeList="tolocationTypeList"
@confirm='requestConfirm'>
@confirm='requestConfirm'
:itemCodeTypeList="itemCodeTypeList">
</com-repleinsh-request-popup>
<win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button>
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
@ -125,7 +126,8 @@
businessType: {},
requestList: [],
managementList: [],
dataContent: {}
dataContent: {},
itemCodeTypeList:[]
};
},
onLoad(option) {
@ -133,6 +135,7 @@
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.itemCodeTypeList = res.itemCodeTypeList;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showRequestPopup();
@ -206,6 +209,8 @@
if (res.data.length > 0) {
res.data.forEach(r => {
r.toLocationCode = item.toLocation.code;
r.itemName = item.itemName
r.uom = item.uom;
that.subList.push(r);
})
@ -367,13 +372,12 @@
submitJob() {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
repleinshRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成补料记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败:" + res.msg)
this.showErrorMessage("提交失败[" + res.msg+"]")
}
}).catch(error => {
uni.hideLoading()

2
pages/repleinsh/request/repleinshRequest.vue

@ -80,7 +80,7 @@
this.detailOptions = getDetailOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndAddAndCloseOption = getDetailAndAddAndCloseOption()
},

2
pages/scrap/request/scrapRrequest.vue

@ -87,7 +87,7 @@
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndAddAndCloseOption = getDetailAndAddAndCloseOption()
},

2
pages/unPlanned/coms/comReceiptRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :showBalanceQty="false"
<item-qty :dataContent="dataContent" :isShowBalanceQty="false"
:isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>

62
pages/unPlanned/coms/comReceiptRequestPopup.vue

@ -68,7 +68,7 @@
</view>
</view>
</uni-popup>
<win-scan-item ref="itemPopup" title='物料代码' @getScanResult='getItemCode'>
<win-scan-item ref="itemPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList">
</win-scan-item>
<winScanLocation ref="locationPopup" title="库位代码" @getLocation='getLocationCode'></winScanLocation>
<comMessage ref="comMessage"></comMessage>
@ -108,7 +108,7 @@
itemCodeFocus: false,
requestInfo: null,
isCheckItemCode: false,
counQty: 0,
counQty: undefined,
numberFocus: false,
uom: "",
show: false,
@ -126,6 +126,10 @@
type: String,
default: '申请信息'
},
itemCodeTypeList: {
type: Array,
default: []
},
},
methods: {
checkNum(e) {
@ -146,10 +150,10 @@
openRequestPopup(editPosition) {
this.editPosition = editPosition;
if (!editPosition) {
this.itemCode = "";
this.itemCode = "请扫描物料信息";
this.uom = ""
this.qty = 0
this.count = 0;
this.counQty = undefined;
this.itemCodeGetFocus();
}
this.$refs.popup.open('bottom')
@ -175,10 +179,6 @@
itemCodeLoseFocus() {
this.itemCodeFocus = false;
},
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() {
if (this.toLocationCode == "") {
@ -186,10 +186,15 @@
return
}
if (this.itemCode == "" || !this.isCheckItemCode) {
if (this.itemCode == "请扫描物料信息" ) {
this.showErrorMessage("请输入物料", "itemCode")
return
}
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) {
this.showErrorMessage("数量必须大于0")
return
@ -198,28 +203,6 @@
this.callback('add');
},
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.itemPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
this.showErrorMessage('未查找到物料【' + itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) {
let item = {
toLocationCode: this.toLocationCode,
@ -254,18 +237,17 @@
this.closeRequestPopup();
},
getItemCode(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package;
},
getLocationCode(location, code) {
this.toLocationCode = code;
},
getItemScanResult(code, scanResult) {
this.itemCode = code;
this.itemName = scanResult.name
this.uom =scanResult.uom
this.stdPackInfo = scanResult.package;
this.numberFocus = true
}
}
}

2
pages/unPlanned/request/issueRequest.vue

@ -90,7 +90,7 @@
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndAddAndCloseOption = getDetailAndAddAndCloseOption()
},

2
pages/unPlanned/request/receiptRequest.vue

@ -89,7 +89,7 @@
this.addAgainOption = getAddAgainOption();
this.detailAndApproveOptions = getDetailAndApproveOption()
this.detailAndApprovePassAndApproveNoOption = getDetailAndApprovePassAndApproveNoOption(),
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndHandleOption = getDetailAndHandleOption()
this.detailAndAddAndCloseOption = getDetailAndAddAndCloseOption()
},

18
pages/unPlanned/request/receiptRequestCreate.vue

@ -39,7 +39,7 @@
<comMessage ref="comMessage"></comMessage>
</view>
</view>
<comReceiptRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm'></comReceiptRequestPopup>
<comReceiptRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' :itemCodeTypeList="itemCodeTypeList"></comReceiptRequestPopup>
</template>
<script>
@ -50,6 +50,9 @@
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
@ -84,7 +87,6 @@
},
data() {
return {
jobContent: {}, //
subList: [], //subList
detailSource: {
subList: []
@ -92,14 +94,24 @@
reasonList: [], //
reasonText: "",
reasonCode: "",
itemCodeTypeList:[]
}
},
mounted() {
this.goScan(true)
},
onLoad(option) {
this.reasonList = getUnPlannedReceiptReasonList()
var typeCode = "UnplannedReceipt"
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
},
methods: {
goScan(editPosition) {

4
router/index.js

@ -10,7 +10,9 @@ console.log("getCurrentPages",apages)
function hasPermission (url) {
console.log('url',url);
// let islogin = sessionStorage.getItem("isLogin");
let islogin = this.$store.state.hasLogin
let islogin = sessionStorage.getItem("hasLogin")
// let islogin = this.$store.state.hasLogin
islogin = Boolean(Number(islogin));//返回布尔值
// 在白名单中或有登录判断条件可以直接跳转
if(whiteList.indexOf(url) !== -1 || islogin) {

Loading…
Cancel
Save