|
@ -12,50 +12,80 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
|
<view class="uni-flex uni-column" style="background-color: white; "> |
|
|
<view class="uni-flex uni-column" style="background-color: white; "> |
|
|
<view class="uni-flex uni-column "> |
|
|
<view class="uni-flex uni-column"> |
|
|
<view class="uni-flex uni-row padding title u-col-center" style="width: 100%;"> |
|
|
|
|
|
<view class="" style="width:25% "> |
|
|
|
|
|
<text>生产线:</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="" > |
|
|
<view class="title " style="display: flex; align-items: center;padding: 10rpx;"> |
|
|
<uni-combox :candidates="productLineList" v-model="productLineCode" placeholder="请扫描来源库位" |
|
|
<text style=" flex-shrink: 0;width: 25%;">生产线:</text> |
|
|
@confirm="handleConfirm" style='height: 30rpx;border:1px solid #fff ;'></uni-combox> |
|
|
<view class="customerBorder" @click="showSelectLine"> |
|
|
|
|
|
{{productionLineName}} |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<u-select v-model="showProductLineSelect" mode="single-column" :list="productLineList" |
|
|
|
|
|
@confirm="confirmSelectLine"></u-select> |
|
|
|
|
|
|
|
|
|
|
|
<view class=""> |
|
|
|
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
|
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" @click="showSelectLine"> |
|
|
|
|
|
</image> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
|
|
|
|
|
|
|
<view class="title padding" style="display: flex;"> |
|
|
<view class="title " style="display: flex;align-items: center;padding: 10rpx;"> |
|
|
<text style=" flex-shrink: 0;">物料:</text> |
|
|
<text style=" flex-shrink: 0; width: 25%;">物料代码:</text> |
|
|
<view class="" style="width: 100% ;"> |
|
|
<view class="customerBorder"> |
|
|
{{itemCode}} |
|
|
{{itemCode}} |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList" |
|
|
|
|
|
@confirm="confirmSelectItem"></u-select> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<image src="/static/search.svg" mode="" |
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" @click="itemCodeClick"> |
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
|
|
|
@click="showSelectItemCode"> |
|
|
</image> |
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class='split_line'></view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="title " style="display: flex;align-items: center;padding: 10rpx;"> |
|
|
|
|
|
<text style=" flex-shrink: 0; width: 25%;">批次:</text> |
|
|
|
|
|
<uni-easyinput v-model="batch"></uni-easyinput> |
|
|
|
|
|
<view class=""> |
|
|
|
|
|
<image src="" mode="" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
|
|
|
@click="showSelectLine"> |
|
|
|
|
|
</image> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class='split_line'></view> |
|
|
|
|
|
<view class="title " style="display: flex;align-items: center;padding: 10rpx;"> |
|
|
|
|
|
<text style=" flex-shrink: 0; width: 25%;">计划数量:</text> |
|
|
|
|
|
<view class="customerBorder"> |
|
|
|
|
|
{{planQty}} |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class=""> |
|
|
|
|
|
<image src="" mode="" |
|
|
|
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
|
|
|
> |
|
|
|
|
|
</image> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
|
<view class="uni-flex uni-row padding title u-col-center"> |
|
|
<view class="title " style="display: flex;align-items: center;padding: 10rpx;"> |
|
|
<text>数量: </text> |
|
|
<text style=" flex-shrink: 0; width: 25%;">包装规格:</text> |
|
|
<view class="uni-flex uni-row uni-center" |
|
|
<view class="customerBorder"> |
|
|
style="display: flex; align-items: center;margin-left: 20rpx;justify-content: center;"> |
|
|
{{packUnit}} |
|
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
<view class="" v-if="stdPackInfo!=undefined" |
|
|
|
|
|
style="display: flex;flex-direction: row;margin-left: 10rpx;"> |
|
|
|
|
|
(<packQty :dataContent="stdPackInfo"></packQty>) |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<u-select v-model="showPackUnitSelect" mode="mutil-column-auto" :list="packUnitList" |
|
|
|
|
|
@confirm="confirmSelectPackUnit"></u-select> |
|
|
|
|
|
<view class=""> |
|
|
|
|
|
<image src="/static/icons/down.svg" mode="" |
|
|
|
|
|
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" |
|
|
|
|
|
@click="showSelectPackUnit"> |
|
|
|
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -66,25 +96,26 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</uni-popup> |
|
|
</uni-popup> |
|
|
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult' |
|
|
|
|
|
:itemCodeTypeList="itemCodeTypeList"> |
|
|
|
|
|
</win-scan-item> |
|
|
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getBasicItemByCode, |
|
|
getIssueJobByProductionline, |
|
|
getProductionlineItem, |
|
|
getPlaneInfoByproductLine, |
|
|
getWorkShopLineStation, |
|
|
getPackUnitByItemCode |
|
|
getWarehouseCodeList |
|
|
|
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
getLocationTypeName, |
|
|
getPackUnitName, |
|
|
getListLocationTypeDesc, |
|
|
getUomInfo |
|
|
checkDirectoryItemExist |
|
|
|
|
|
} from '@/common/directory.js'; |
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
getCurrDate, |
|
|
|
|
|
getBatch8 |
|
|
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
|
import uom from '@/mycomponents/qty/uom.vue' |
|
|
import uom from '@/mycomponents/qty/uom.vue' |
|
|
import packQty from '@/mycomponents/qty/packQty.vue' |
|
|
import packQty from '@/mycomponents/qty/packQty.vue' |
|
|
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
|
|
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
|
@ -99,42 +130,58 @@ |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
workshopCode: "", //车间 |
|
|
itemCode: '请选择物料信息', |
|
|
workShopName: "", |
|
|
|
|
|
productionLineCode: "", //生产线 |
|
|
|
|
|
productionLineName: "", |
|
|
|
|
|
workStationCode: "", //工位 |
|
|
|
|
|
workStationName: "", |
|
|
|
|
|
itemCode: '请扫描物料信息', |
|
|
|
|
|
fromWarehouseCode: "请选择仓库代码", |
|
|
|
|
|
itemName: "", |
|
|
|
|
|
qty: 0, |
|
|
|
|
|
rawLocationCode: "", |
|
|
|
|
|
fgLocationCode: "", |
|
|
|
|
|
itemCodeFocus: false, |
|
|
|
|
|
requestInfo: null, |
|
|
|
|
|
itemCodeList: [], |
|
|
|
|
|
counQty: undefined, |
|
|
|
|
|
editPosition: true, |
|
|
|
|
|
numberFocus: false, |
|
|
|
|
|
uom: "", |
|
|
uom: "", |
|
|
positionInfo: "请选择位置", |
|
|
planQty: 0, |
|
|
show: false, |
|
|
number: "", |
|
|
isModifiedPosition: true, |
|
|
productLineCode: "", |
|
|
positionList: [], |
|
|
showProductLineSelect: false, |
|
|
stdQty: 0, //标包 |
|
|
productLineList: [], |
|
|
maxlength: 10, |
|
|
productionLineName: "请选择生产线", |
|
|
stdPackInfo: undefined, |
|
|
productionLineCode: "", |
|
|
wareHouseList: [], |
|
|
batch: "", |
|
|
showWareHouse: false, |
|
|
packUnit: "请选择包装规格", |
|
|
productLineList:[], |
|
|
showPackUnitSelect: false, |
|
|
productLineCode:"" |
|
|
itemCodeList: [], |
|
|
|
|
|
showItemCodeSelect: false, |
|
|
|
|
|
packUnitList: [{ |
|
|
|
|
|
value: 1, |
|
|
|
|
|
label: '中国', |
|
|
|
|
|
children: [{ |
|
|
|
|
|
value: 2, |
|
|
|
|
|
label: '广东', |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: 5, |
|
|
|
|
|
label: '广西', |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: 8, |
|
|
|
|
|
label: '美国', |
|
|
|
|
|
children: [{ |
|
|
|
|
|
value: 9, |
|
|
|
|
|
label: '纽约', |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: 10, |
|
|
|
|
|
label: '华盛顿', |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
title: { |
|
|
title: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: '完工信息' |
|
|
default: '开工阶段' |
|
|
}, |
|
|
}, |
|
|
itemCodeTypeList: { |
|
|
itemCodeTypeList: { |
|
|
type: Array, |
|
|
type: Array, |
|
@ -142,247 +189,211 @@ |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
checkNum(e) { |
|
|
openRequestPopup() { |
|
|
let value = e.detail.value; |
|
|
this.initData(); |
|
|
let dot = value.indexOf('.'); //包含小数点 |
|
|
this.batch = getBatch8() |
|
|
let reg = /^[0-9]+$/; //正整数 |
|
|
|
|
|
if (dot > -1) { |
|
|
|
|
|
this.maxlength = dot + 7; //长度是小数点后两位 |
|
|
|
|
|
if (value.length > dot + 7) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (reg.test(value)) { //如果是正整数不包含小数点 |
|
|
|
|
|
this.maxlength = 10; |
|
|
|
|
|
} |
|
|
|
|
|
this.change(value) |
|
|
|
|
|
}, |
|
|
|
|
|
openRequestPopup(editPosition) { |
|
|
|
|
|
if (this.positionList.length == 0) { |
|
|
|
|
|
getWorkShopLineStation().then(res => { |
|
|
|
|
|
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.show = false |
|
|
|
|
|
this.showWareHouse = false |
|
|
|
|
|
this.uom = "" |
|
|
|
|
|
this.qty = 0; |
|
|
|
|
|
this.stdPackInfo = undefined; |
|
|
|
|
|
this.counQty = undefined; |
|
|
|
|
|
this.numberFocus = false |
|
|
|
|
|
this.itemCodeGetFocus(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(res => { |
|
|
|
|
|
this.$refs.popup.open('bottom') |
|
|
this.$refs.popup.open('bottom') |
|
|
}, 500) |
|
|
|
|
|
}, |
|
|
}, |
|
|
initData() { |
|
|
initData() { |
|
|
this.positionList = []; |
|
|
this.itemCode = '请选择物料信息'; |
|
|
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.uom = "" |
|
|
this.qty = 0; |
|
|
this.planQty = 0 |
|
|
this.stdPackInfo = undefined; |
|
|
this.number = "" |
|
|
this.counQty = undefined; |
|
|
this.productLineCode = "" |
|
|
this.numberFocus = false |
|
|
this.showProductLineSelect = false |
|
|
|
|
|
this.productLineList = [] |
|
|
|
|
|
this.productionLineName = "请选择生产线" |
|
|
|
|
|
this.productionLineCode = "" |
|
|
|
|
|
this.batch = "" |
|
|
|
|
|
this.packUnit = "请选择包装规格" |
|
|
|
|
|
this.showPackUnitSelect = false |
|
|
|
|
|
// this.packUnitList = [] |
|
|
|
|
|
this.itemCodeList = [] |
|
|
|
|
|
this.showItemCodeSelect = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
closeRequestPopup() { |
|
|
closeRequestPopup() { |
|
|
this.$refs.popup.close() |
|
|
this.$refs.popup.close() |
|
|
}, |
|
|
}, |
|
|
locationConfirm() { |
|
|
|
|
|
//查询库位信息 |
|
|
|
|
|
this.checkLocatioCode(); |
|
|
|
|
|
}, |
|
|
|
|
|
itemCodeClick() { |
|
|
|
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
itemCodeGetFocus() { |
|
|
|
|
|
this.itemCodeFocus = true; |
|
|
|
|
|
}, |
|
|
|
|
|
itemCodeLoseFocus() { |
|
|
itemCodeLoseFocus() { |
|
|
this.itemCodeFocus = false; |
|
|
this.itemCodeFocus = false; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
confirm() { |
|
|
confirm() { |
|
|
if (this.positionInfo == "请选择位置") { |
|
|
if (this.productionLineName == "请选择生产线") { |
|
|
this.showErrorMessage("请选择位置") |
|
|
this.showErrorMessage("请选择生产线") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.fromWarehouseCode == "请选择仓库代码") { |
|
|
if (!this.batch) { |
|
|
this.showErrorMessage("请选择仓库代码") |
|
|
this.showErrorMessage("请输入批次例如:20200101") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.itemCode == "请选择物料信息") { |
|
|
if (this.itemCode == "请扫描物料信息") { |
|
|
this.showErrorMessage("请选择物料信息") |
|
|
this.showErrorMessage("请输入物料", "itemCode") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.counQty == undefined) { |
|
|
|
|
|
this.showErrorMessage("请输入数量") |
|
|
|
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.qty == 0) { |
|
|
if (this.itemCode == "请选择包装规格") { |
|
|
this.showErrorMessage("数量必须大于0") |
|
|
this.showErrorMessage("请选择包装规格") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.rawLocationCode == '') { |
|
|
this.callback(); |
|
|
this.showErrorMessage(this.workStationName + "的原材料库位为空") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.callback('add'); |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
callback(action) { |
|
|
callback() { |
|
|
let item = { |
|
|
let item = { |
|
|
positionInfo: this.positionInfo, |
|
|
|
|
|
workshopCode: this.workshopCode, //车间 |
|
|
|
|
|
workShopName: this.workShopName, |
|
|
|
|
|
productionLineCode: this.productionLineCode, //生产线 |
|
|
|
|
|
productionLineName: this.productionLineName, |
|
|
productionLineName: this.productionLineName, |
|
|
workStationCode: this.workStationCode, //工位 |
|
|
productionLineCode: this.productionLineCode, //生产线 |
|
|
workStationName: this.workStationName, |
|
|
|
|
|
rawLocationCode: this.rawLocationCode, |
|
|
|
|
|
fgLocationCode: this.fgLocationCode, |
|
|
|
|
|
fromWarehouseCode: this.fromWarehouseCode, |
|
|
|
|
|
toWarehouseCode: this.fromWarehouseCode, |
|
|
|
|
|
itemCode: this.itemCode, |
|
|
itemCode: this.itemCode, |
|
|
itemName: this.itemName, |
|
|
|
|
|
uom: this.uom, |
|
|
uom: this.uom, |
|
|
qty: this.qty |
|
|
batch: this.batch, |
|
|
|
|
|
packUnit: "packUnit", |
|
|
|
|
|
planQty: this.planQty, |
|
|
|
|
|
number: this.number |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
this.closeRequestPopup(); |
|
|
this.closeRequestPopup(); |
|
|
this.$emit("confirm", action, item); |
|
|
this.$emit("confirm", item); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showErrorMessage(message, type) { |
|
|
showErrorMessage(message, type) { |
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => {}) |
|
|
if (type == "itemCode") { |
|
|
|
|
|
this.itemCodeGetFocus(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.numberFocus = true; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
if (type == "itemCode") { |
|
|
|
|
|
this.itemCode = "请扫描物料信息" |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
change(value) { |
|
|
|
|
|
this.qty = value; |
|
|
|
|
|
}, |
|
|
}, |
|
|
cancel(e) { |
|
|
cancel(e) { |
|
|
this.closeRequestPopup(); |
|
|
this.closeRequestPopup(); |
|
|
}, |
|
|
}, |
|
|
showSelect() { |
|
|
|
|
|
if (this.editPosition) { |
|
|
confirmSelectLine(data) { |
|
|
this.show = true |
|
|
this.productionLineName = data[0].label |
|
|
} |
|
|
this.productionLineCode = data[0].value |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showWarseHouseSelect() { |
|
|
showSelectLine() { |
|
|
if (this.editPosition) { |
|
|
if (this.productLineList.length == 0) { |
|
|
this.wareHouseClick(); |
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}) |
|
|
|
|
|
getIssueJobByProductionline().then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data && res.data.length > 0) { |
|
|
|
|
|
res.data.forEach(item => { |
|
|
|
|
|
item.label = item.name |
|
|
|
|
|
}) |
|
|
|
|
|
this.productLineList = res.data |
|
|
|
|
|
this.showProductLineSelect = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage('未查找到生产线信息'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showErrorMessage(error); |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showProductLineSelect = true |
|
|
} |
|
|
} |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
confirmSelect(e) { |
|
|
|
|
|
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label |
|
|
}, |
|
|
console.log("位置", this.positionInfo) |
|
|
showSelectItemCode() { |
|
|
this.workshopCode = e[0].value |
|
|
if (!this.productionLineCode) { |
|
|
this.productionLineCode = e[1].value |
|
|
this.showErrorMessage('请先选择生产线'); |
|
|
this.workStationCode = e[2].value |
|
|
|
|
|
this.workShopName = e[0].label |
|
|
|
|
|
this.productionLineName = e[1].label |
|
|
|
|
|
this.workStationName = e[2].label |
|
|
|
|
|
|
|
|
|
|
|
let shop = this.positionList.find(shop => shop.value == this.workshopCode); |
|
|
|
|
|
if (shop != undefined && shop.children != undefined) { |
|
|
|
|
|
let prodLine = shop.children.find(line => line.value == this.productionLineCode); |
|
|
|
|
|
if (prodLine != undefined && prodLine.children != undefined) { |
|
|
|
|
|
let station = prodLine.children.find(r => r.value == this.workStationCode); |
|
|
|
|
|
if (station.rawLocationCode == '' && station.rawLocationCode == null) { |
|
|
|
|
|
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择") |
|
|
|
|
|
return; |
|
|
return; |
|
|
} else { |
|
|
|
|
|
this.rawLocationCode = station.rawLocationCode; |
|
|
|
|
|
this.fgLocationCode = station.fgLocationCode; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.itemCodeList.length == 0) { |
|
|
|
|
|
console.log("当天", getCurrDate()) |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}) |
|
|
|
|
|
getPlaneInfoByproductLine(this.productionLineCode, getCurrDate()).then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data && res.data.length > 0) { |
|
|
|
|
|
res.data.forEach(item => { |
|
|
|
|
|
item.label = item.itemCode |
|
|
|
|
|
}) |
|
|
|
|
|
this.itemCodeList = res.data |
|
|
|
|
|
this.showItemCodeSelect = true |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("生产线-工位基础信息维护错误") |
|
|
this.showErrorMessage('未查找到物料信息'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showErrorMessage(error); |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("车间-生产线基础信息维护错误") |
|
|
this.showItemCodeSelect = true |
|
|
} |
|
|
} |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getItemScanResult(code, scanResult) { |
|
|
|
|
|
this.itemCode = code; |
|
|
|
|
|
this.itemName = scanResult.name |
|
|
|
|
|
this.uom = scanResult.uom |
|
|
|
|
|
this.stdPackInfo = scanResult.package; |
|
|
|
|
|
this.numberFocus = true |
|
|
|
|
|
}, |
|
|
}, |
|
|
wareHouseClick() { |
|
|
confirmSelectItem(data) { |
|
|
|
|
|
this.itemCode = data[0].label |
|
|
|
|
|
var item = this.itemCodeList.find(res => res.itemCode == this.itemCode) |
|
|
|
|
|
this.uom = item.uom |
|
|
|
|
|
this.planQty = item.planQty |
|
|
|
|
|
this.number = item.number |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showSelectPackUnit() { |
|
|
|
|
|
if (this.packUnitList.length == 0) { |
|
|
|
|
|
if (this.itemCode == "请选择物料信息") { |
|
|
|
|
|
this.showErrorMessage('请先选择物料'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "查询中....", |
|
|
title: "加载中", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}) |
|
|
getWarehouseCodeList(1, 100).then(res => { |
|
|
getPackUnitByItemCode(this.itemCode).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data != null && res.data.list.length > 0) { |
|
|
if (res.data && res.data.list.length > 0) { |
|
|
res.data.list.forEach(item => { |
|
|
res.data.list.forEach(item => { |
|
|
item.value = item.code; |
|
|
item.value = item.packUnit |
|
|
item.label = item.name; |
|
|
item.label = getPackUnitName(item.packUnit) + "(" + item.packQty + this |
|
|
|
|
|
.getUomInfo(item.uom) + ")"; |
|
|
}) |
|
|
}) |
|
|
this.wareHouseList = res.data.list |
|
|
// this.packUnitList = res.data.list |
|
|
this.showWareHouse = true |
|
|
this.showPackUnitSelect = true |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage('未查找到仓库代码'); |
|
|
this.showErrorMessage('未查找到包装信息'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error); |
|
|
this.showErrorMessage(error); |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showPackUnitSelect = true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
confirmSelectPackUnit(data) { |
|
|
|
|
|
|
|
|
|
|
|
let pack = this.packUnitList.filter(r => r.packUnit == data[0].value)[0]; |
|
|
|
|
|
// this.packUnit = pack.packQty; |
|
|
|
|
|
this.packUnit = data[0].label |
|
|
|
|
|
|
|
|
confirmWareHouse(e) { |
|
|
|
|
|
this.fromWarehouseCode = e[0].value; |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
getUomInfo(uom) { |
|
|
|
|
|
let item = getUomInfo(uom); |
|
|
|
|
|
if (item == '') { |
|
|
|
|
|
return uom; |
|
|
|
|
|
} else { |
|
|
|
|
|
return item.label |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -394,4 +405,11 @@ |
|
|
.title { |
|
|
.title { |
|
|
font-size: 30rpx; |
|
|
font-size: 30rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.customerBorder { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
border: 1rpx solid lightgray; |
|
|
|
|
|
border-radius: 5rpx; |
|
|
|
|
|
padding: 15rpx; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |