|
|
@ -2,126 +2,49 @@ |
|
|
|
<!-- 添加维修工单 --> |
|
|
|
<view class="add-form-container"> |
|
|
|
<u-form :model="form" ref="formRef" label-width="160rpx"> |
|
|
|
<u-form-item label="批次号" prop="number"> |
|
|
|
<u-input v-model="form.number" placeholder="请输入批次号" /> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="供应商" prop="supplierName"> |
|
|
|
<u-input v-model="form.supplierName" placeholder="请输入供应商" /> |
|
|
|
</u-form-item> |
|
|
|
</u-form> |
|
|
|
<view class="list"> |
|
|
|
<view class="title"> |
|
|
|
<span>*</span>订单信息 |
|
|
|
</view> |
|
|
|
<view class="item " v-for="(item,index) in orderList" :key="index"> |
|
|
|
<view class="item-box"> |
|
|
|
<view class="spare-title"> |
|
|
|
<view class="title-txt"> |
|
|
|
备件名称:{{item.itemName}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-row gutter="16"> |
|
|
|
<!-- <u-col :span="24"> |
|
|
|
<view class="dec"> |
|
|
|
库位:{{item.locationNumber}} |
|
|
|
</view> |
|
|
|
</u-col> --> |
|
|
|
|
|
|
|
<u-col :span="24"> |
|
|
|
<view class="dec"> |
|
|
|
已入库数量:{{item.deliveryQty}} |
|
|
|
</view> |
|
|
|
</u-col> |
|
|
|
<u-col :span="24"> |
|
|
|
<view class="dec"> |
|
|
|
采购数量:{{item.qty}} |
|
|
|
</view> |
|
|
|
</u-col> |
|
|
|
</u-row> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <u-form-item label="归还人员" prop="reverterName" required> |
|
|
|
<view class="select" @click="openSingleColumn('reverterId',form.reverterId,reverterUser)"> |
|
|
|
<view class="input" v-if='form.reverterId'> |
|
|
|
{{selectFormat(form.reverterId,reverterUser)}} |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="list"> |
|
|
|
<view class="title"> |
|
|
|
<span>*</span>申请备件 |
|
|
|
</view> |
|
|
|
<view class="item " v-for="(item,index) in form.itemNumbers" :key="index"> |
|
|
|
<view class="item-box"> |
|
|
|
<view class="spare-title"> |
|
|
|
<view class="title-txt"> |
|
|
|
备件名称:{{item.itemName}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-row gutter="16"> |
|
|
|
<u-col :span="24"> |
|
|
|
<view class="dec"> |
|
|
|
入库数量:{{item.qty}} |
|
|
|
</view> |
|
|
|
</u-col> |
|
|
|
<u-col :span="24"> |
|
|
|
<view class="dec"> |
|
|
|
采购数量:{{item.applyQty}} |
|
|
|
</view> |
|
|
|
</u-col> |
|
|
|
</u-row> |
|
|
|
<view class="placeholder" v-else> |
|
|
|
{{`请选择归还人员`}} |
|
|
|
</view> |
|
|
|
<u-icon name="minus-circle" color="#aaaaaa" size="60" @click="delSpareParts(index)"></u-icon> |
|
|
|
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
|
|
|
</view> |
|
|
|
<view class="add-btn"> |
|
|
|
<u-button type="primary" @click="open"><u-icon name="plus-circle" color="#ffffff" |
|
|
|
size="36"></u-icon>添加备件</u-button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="footer"> |
|
|
|
<view class="btns"> |
|
|
|
<button class="reset" @click="reset">重置</button> |
|
|
|
<button class="sure" @click="submit" :loading='loading' :disabled='loading'>确定</button> |
|
|
|
</view> |
|
|
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|
|
|
</view> |
|
|
|
<!-- 添加备件 --> |
|
|
|
<u-popup v-model="isPopupShow" mode="center" border-radius="14"> |
|
|
|
<view class="popup-title">添加备件</view> |
|
|
|
<scroll-view scroll-y="true" style="max-height:60vh;"> |
|
|
|
<view class="popup"> |
|
|
|
<u-form :model="form1" ref="form1Ref" label-width="160rpx"> |
|
|
|
</u-form-item> --> |
|
|
|
<u-form-item label="归还人员" prop="returner"> |
|
|
|
<u-input v-model="form.returner" placeholder="请输入归还人"/> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item :label="`备件编号`" prop="itemNumber" required> |
|
|
|
<view class="select"> |
|
|
|
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur='blur1()' |
|
|
|
@confirm="handelScanMsg1" :focus='isFocus' /> |
|
|
|
</view> |
|
|
|
<u-input v-model="form.itemNumber" placeholder="请输入备件" @blur='blur1()' @confirm="handelScanMsg1" :focus='isFocus'/> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item :label="`备件名称`" prop="itemName" required class="disabled"> |
|
|
|
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> |
|
|
|
<view class="select"> |
|
|
|
<u-input v-model="form1.itemName" placeholder="根据备件编号获取" disabled /> |
|
|
|
<u-input v-model="form.itemName" placeholder="根据备件编号获取" disabled /> |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="库位" prop="locationNumber" required v-if="isShow"> |
|
|
|
<u-input v-model="form1.locationNumber" placeholder="请输入库位" @blur='blur()' |
|
|
|
@confirm="handelScanMsg" /> |
|
|
|
|
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="采购数量" prop="applyQty" required class="disabled"> |
|
|
|
<u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入采购数量" /> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="已入库数量" prop="deliveryQty" required class="disabled"> |
|
|
|
<u-input v-model="form1.deliveryQty" type="number" disabled placeholder="请输入已入库数量" /> |
|
|
|
<u-input v-model="form.locationNumber" placeholder="请输入库位" @blur="blur()" @confirm="handelScanMsg"/> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="入库数量" prop="qty" required> |
|
|
|
<u-input v-model="form1.qty" type="number" placeholder="请输入入库数量" /> |
|
|
|
<u-form-item label="数量" prop="qty" required> |
|
|
|
<u-input v-model="form.qty" type="number" placeholder="请输入数量" /> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="描述" prop="qty"> |
|
|
|
<!-- <u-form-item label="描述" prop="describes" required> |
|
|
|
<u-input v-model="form1.describes" placeholder="请输入描述" /> |
|
|
|
</u-form-item> |
|
|
|
</u-form-item> --> |
|
|
|
|
|
|
|
</u-form> |
|
|
|
<view class="footer"> |
|
|
|
<view class="btns"> |
|
|
|
<button class="reset" @click="reset">重置</button> |
|
|
|
<button class="sure" @click="submit" :loading='loading' :disabled='loading'>确定</button> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<view class="popup-footer"> |
|
|
|
<view @click="isPopupShow = false">取消</view> |
|
|
|
<view class="sure" @click="addSpare">确认</view> |
|
|
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
|
|
|
|
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' |
|
|
|
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -133,53 +56,73 @@ |
|
|
|
ref, |
|
|
|
getCurrentInstance |
|
|
|
} from 'vue' |
|
|
|
import * as inLocationApi from "@/api/inLocation" |
|
|
|
import * as userApi from "@/api/user" |
|
|
|
import * as sparePartsReturnApi from "@/api/sparePartsReturn" |
|
|
|
import * as sparePartsApi from "@/api/spareParts" |
|
|
|
import * as locationApi from "@/api/location" |
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
|
|
|
|
const loading = ref(false) |
|
|
|
const orderList = ref([])//订单信息 |
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
const loading = ref(false) |
|
|
|
// 备件弹窗 |
|
|
|
const isPopupShow = ref(false) |
|
|
|
const singleColumnShow = ref(false) |
|
|
|
const singleColumnDefaultValue = ref([]) |
|
|
|
const singleColumnList = ref([]) |
|
|
|
const field = ref('') |
|
|
|
const reverterUser = ref([]) |
|
|
|
const form = ref({ |
|
|
|
id: '', |
|
|
|
number: '', |
|
|
|
itemNumbers: [], |
|
|
|
supplierName:'' |
|
|
|
itemNumbers: [] |
|
|
|
}) |
|
|
|
const form1 = ref({ |
|
|
|
itemNumber: "", |
|
|
|
itemName: '', |
|
|
|
locationNumber: '', |
|
|
|
applyQty: '', |
|
|
|
deliveryQty: '', |
|
|
|
qty: '' |
|
|
|
}) |
|
|
|
const itemNumber = ref() |
|
|
|
const isShow = ref(false) |
|
|
|
const locationList = ref([])//备件的库位列表 |
|
|
|
const locationItem = ref('')//备件账内库 |
|
|
|
const isFocus = ref(false) |
|
|
|
const msg = ref('') |
|
|
|
|
|
|
|
const choosesingleColumnItem = ref() |
|
|
|
const itemNumber = ref() |
|
|
|
const msg = ref() |
|
|
|
|
|
|
|
// 触发提交表单 |
|
|
|
function submit() { |
|
|
|
if (form.value.itemNumbers.length === 0) { |
|
|
|
// 校验 |
|
|
|
// if (!form.value.reverterId) { |
|
|
|
// proxy.$modal.showToast('请选择归还人员') |
|
|
|
// return; |
|
|
|
// } |
|
|
|
if (form.value.itemNumber==''|| form.value.itemNumber==null) { |
|
|
|
proxy.$modal.showToast('请选择备件') |
|
|
|
return; |
|
|
|
} |
|
|
|
proxy.$modal.confirm('是否添加入库信息').then(() => { |
|
|
|
if (form.value.locationNumber==''|| form.value.locationNumber==null) { |
|
|
|
proxy.$modal.showToast('请选择库位') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (Number(form.value.qty) <= 0) { |
|
|
|
proxy.$modal.showToast('出库数量需大于0') |
|
|
|
return; |
|
|
|
} |
|
|
|
proxy.$modal.confirm('是否归还备件').then(() => { |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
loading.value = true |
|
|
|
inLocationApi.inLocationCreat(form.value).then((res) => { |
|
|
|
sparePartsReturnApi.create(form.value).then((res) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
if (res.data) { |
|
|
|
proxy.$modal.showToast('添加成功') |
|
|
|
proxy.$modal.showToast('归还成功') |
|
|
|
setTimeout(() => { |
|
|
|
proxy.$tab.navigateBack() |
|
|
|
loading.value = false |
|
|
|
}, 1500) |
|
|
|
} else { |
|
|
|
proxy.$modal.showToast('添加失败') |
|
|
|
proxy.$modal.showToast('归还失败') |
|
|
|
loading.value = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
@ -191,14 +134,47 @@ |
|
|
|
} |
|
|
|
// 重置 |
|
|
|
function reset() { |
|
|
|
form.value.supplierName = '' |
|
|
|
form.value.itemNumbers = [] |
|
|
|
form.value.itemNumber='' |
|
|
|
form.value.itemName='' |
|
|
|
form.value.locationNumber='' |
|
|
|
form.value.returner='' |
|
|
|
form.value.qty='' |
|
|
|
isShow.value= false |
|
|
|
} |
|
|
|
|
|
|
|
function selectFormat(val, array) { |
|
|
|
let str = array.filter(item => item.value == val)[0].label |
|
|
|
return str |
|
|
|
} |
|
|
|
// 单列模式 |
|
|
|
function openSingleColumn(fieldName, val, list) { |
|
|
|
singleColumnList.value = list |
|
|
|
field.value = fieldName |
|
|
|
if (val) { |
|
|
|
singleColumnDefaultValue.value = [list.findIndex(item => item.value == val)] |
|
|
|
} else { |
|
|
|
singleColumnDefaultValue.value = [] |
|
|
|
} |
|
|
|
singleColumnShow.value = true |
|
|
|
} |
|
|
|
// 获取订单信息详情 |
|
|
|
async function getInLocationDetail() { |
|
|
|
await inLocationApi.getInLocationDetail(form.value.id).then(res => { |
|
|
|
orderList.value = res.data |
|
|
|
}).catch((err) => { }) |
|
|
|
// 单列模式点击确定之后 |
|
|
|
function chooseSingleColumn(e) { |
|
|
|
form.value[field.value] = e[0].value |
|
|
|
if(field.value == 'reverterId'){ |
|
|
|
choosesingleColumnItem.value = singleColumnList.value.filter(item => item.id == e[0].value) |
|
|
|
form.value.reverterName = choosesingleColumnItem.value[0].name |
|
|
|
} |
|
|
|
singleColumnShow.value = false |
|
|
|
} |
|
|
|
// 获取归还人员列表 |
|
|
|
async function getReverterUser() { |
|
|
|
await userApi.getReverterUser().then(res => { |
|
|
|
res.data.map(item => { |
|
|
|
item.value = item.id |
|
|
|
item.label = item.nickname |
|
|
|
}) |
|
|
|
reverterUser.value = res.data |
|
|
|
}) |
|
|
|
} |
|
|
|
// 打开弹窗 |
|
|
|
function open() { |
|
|
@ -206,12 +182,10 @@ |
|
|
|
itemNumber: "", |
|
|
|
itemName: '', |
|
|
|
locationNumber: '', |
|
|
|
applyQty: '', |
|
|
|
deliveryQty: '', |
|
|
|
qty: '' |
|
|
|
} |
|
|
|
isPopupShow.value = true |
|
|
|
isShow.value = false |
|
|
|
isShow.value= false |
|
|
|
isFocus.value = true |
|
|
|
} |
|
|
|
// 添加备件 |
|
|
@ -229,34 +203,32 @@ |
|
|
|
proxy.$modal.showToast('请选择库位') |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!locationItem.value || locationItem.value.isInAccount === 'FALSE') { |
|
|
|
proxy.$modal.showToast('该库位属于帐外库,请选择帐内库') |
|
|
|
if (!locationItem.value || locationItem.value.isInAccount === 'TRUE') { |
|
|
|
proxy.$modal.showToast('该库位属于帐内库,请选择帐外库') |
|
|
|
return; |
|
|
|
} |
|
|
|
if (itemNumber.value) { |
|
|
|
proxy.$modal.showToast('该库位已绑定过备件') |
|
|
|
proxy.$modal.showToast('该库位已绑定过其他备件') |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!form1.value.qty) { |
|
|
|
proxy.$modal.showToast(`请输入数量`) |
|
|
|
return; |
|
|
|
} |
|
|
|
if (Number(form1.value.qty) + Number(form1.value.deliveryQty) > Number(form1.value.applyQty)) { |
|
|
|
proxy.$modal.showToast('已入库数量和入库数量不可大于采购数量') |
|
|
|
|
|
|
|
if (!form1.value.describes) { |
|
|
|
proxy.$modal.showToast(`请输入描述`) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (form.value.itemNumbers && form.value.itemNumbers.length > 0) { |
|
|
|
let arr = form.value.itemNumbers.filter(item => item.itemNumber == form1.value.itemNumber) |
|
|
|
let arr =form.value.itemNumbers.filter(item => item.itemNumber == form1.value.itemNumber) |
|
|
|
if (arr && arr.length > 0) { |
|
|
|
proxy.$modal.showToast('该备件已添加') |
|
|
|
return; |
|
|
|
} |
|
|
|
let arr1 = orderList.value.filter(item => item.itemNumber == form1.value.itemNumber) |
|
|
|
if (!arr1 || (arr1 && arr1.length == 0)) { |
|
|
|
proxy.$modal.showToast('订单信息没有该备件') |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
form.value.itemNumbers.push(form1.value) |
|
|
|
isPopupShow.value = false |
|
|
|
} |
|
|
@ -264,35 +236,45 @@ |
|
|
|
function delSpareParts(index) { |
|
|
|
form.value.itemNumbers.splice(index, 1) |
|
|
|
} |
|
|
|
//获取库位信息 |
|
|
|
function getLocation() { |
|
|
|
locationApi.getLocation(form1.value.locationNumber).then(res => { |
|
|
|
if (!res.data) { |
|
|
|
msg.value = res.msg |
|
|
|
sparePartsApi.getByLocationNumber({ |
|
|
|
locationNumber: form.value.locationNumber |
|
|
|
}).then(res => { |
|
|
|
if(!res.data){ |
|
|
|
if(res.msg){ |
|
|
|
proxy.$modal.showToast(res.msg) |
|
|
|
msg.value = res.msg |
|
|
|
form.value.locationNumber = '' |
|
|
|
}else{ |
|
|
|
form.value.locationNumber = '' |
|
|
|
proxy.$modal.showToast('找不到该库位') |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
if(res.data.locationNumber==null){ |
|
|
|
proxy.$modal.showToast("找不到该库位") |
|
|
|
form.value.locationNumber = '' |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
locationItem.value = res.data |
|
|
|
form1.value.areaNumber = locationItem.value.areaNumber |
|
|
|
itemNumber.value = res.data.itemNumber || '' |
|
|
|
// 判断该库位在之前添加的列表里有没有被绑定过 |
|
|
|
if (form.value.itemNumbers && form.value.itemNumbers.length > 0) { |
|
|
|
let arr = form.value.itemNumbers.filter(item => item.locationNumber == form1.value |
|
|
|
.locationNumber) |
|
|
|
if (arr && arr.length > 0) { |
|
|
|
itemNumber.value = 1 |
|
|
|
} else { |
|
|
|
itemNumber.value = res.data.itemNumber || '' |
|
|
|
} |
|
|
|
} else { |
|
|
|
itemNumber.value = res.data.itemNumber || '' |
|
|
|
if (res.data.itemNumber !=null && res.data.itemNumber !='') {//有备件 |
|
|
|
form.value.locationNumber = '' |
|
|
|
proxy.$modal.showToast('该库位已绑定过备件') |
|
|
|
return |
|
|
|
}else{ |
|
|
|
//itemNumber.value = res.data.itemNumber || '' |
|
|
|
} |
|
|
|
}).catch((err) => { }) |
|
|
|
}).catch(()=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
function blur() { |
|
|
|
if (form1.value.locationNumber) { |
|
|
|
if (form.value.locationNumber) { |
|
|
|
getLocation() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// 扫描设备条码 |
|
|
|
function handelScanMsg() { |
|
|
@ -300,44 +282,95 @@ |
|
|
|
} |
|
|
|
// 获取备件信息 |
|
|
|
function getSparePartsInfo() { |
|
|
|
sparePartsApi.getSparePartsInfo({ |
|
|
|
number: form1.value.itemNumber, |
|
|
|
id: form.value.id |
|
|
|
sparePartsApi.getByItemNumber({ |
|
|
|
itemNumber: form.value.itemNumber, |
|
|
|
}).then(res => { |
|
|
|
if (!res.data) { |
|
|
|
if(!res.data){ |
|
|
|
proxy.$modal.showToast(res.msg) |
|
|
|
msg.value = res.msg |
|
|
|
itemNumber.value = '' |
|
|
|
form1.value.areaNumber = '' |
|
|
|
form1.value.locationNumber = ''; |
|
|
|
form1.value.itemName = '' |
|
|
|
form.value.areaNumber = '' |
|
|
|
form.value.locationNumber = ''; |
|
|
|
form.value.itemName = '' |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if(res.data.itemName==null || res.data.itemName==''){ |
|
|
|
proxy.$modal.showToast("找不到该备件") |
|
|
|
form.value.itemNumber = '' |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
itemNumber.value = '' |
|
|
|
form1.value.itemName = res.data.itemName |
|
|
|
form1.value.deliveryQty = res.data.deliveryQty |
|
|
|
form1.value.applyQty = res.data.applyQty |
|
|
|
// 判断是否有帐内库 |
|
|
|
locationItem.value = res.data.list.filter(item => item.isInAccount === 'TRUE')[0] |
|
|
|
if (locationItem.value) { |
|
|
|
form1.value.areaNumber = locationItem.value.areaNumber |
|
|
|
form1.value.locationNumber = locationItem.value.locationNumber |
|
|
|
form.value.itemName = res.data.itemName |
|
|
|
if(res.data.locationNumber|| res.data.locationNumber=='' || res.data.locationNumber==null){ |
|
|
|
isShow.value =true |
|
|
|
}else{ |
|
|
|
form.value.locationNumber = res.data.locationNumber |
|
|
|
isShow.value = false |
|
|
|
} else { |
|
|
|
form1.value.areaNumber = '' |
|
|
|
form1.value.locationNumber = '' |
|
|
|
isShow.value = true |
|
|
|
} |
|
|
|
|
|
|
|
}).catch((err) => { |
|
|
|
// 判断是否有帐外库 |
|
|
|
// locationItem.value = res.data.list.filter(item=>item.isInAccount==='FALSE')[0] |
|
|
|
// if(locationItem.value){ |
|
|
|
// form1.value.areaNumber = locationItem.value.areaNumber |
|
|
|
// form1.value.locationNumber = locationItem.value.locationNumber |
|
|
|
// isShow.value =false |
|
|
|
// }else{ |
|
|
|
// form1.value.areaNumber = '' |
|
|
|
// form1.value.locationNumber = '' |
|
|
|
|
|
|
|
// } |
|
|
|
}).catch((err)=>{ |
|
|
|
msg.value = err.msg |
|
|
|
itemNumber.value = '' |
|
|
|
form1.value.areaNumber = '' |
|
|
|
form1.value.itemName = '' |
|
|
|
form1.value.applyQty = '' |
|
|
|
form1.value.deliveryQty = '' |
|
|
|
form.value.areaNumber = '' |
|
|
|
form.value.itemName = '' |
|
|
|
form.value.applyQty = '' |
|
|
|
form.value.deliveryQty = '' |
|
|
|
locationList.value = []; |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// function getSparePartsInfo() { |
|
|
|
// sparePartsApi.getSparePartsReturnInfo({ |
|
|
|
// number: form1.value.itemNumber, |
|
|
|
// }).then(res => { |
|
|
|
// if(!res.data){ |
|
|
|
// proxy.$modal.showToast(res.msg) |
|
|
|
// msg.value = res.msg |
|
|
|
// itemNumber.value = '' |
|
|
|
// form1.value.areaNumber = '' |
|
|
|
// form1.value.locationNumber = ''; |
|
|
|
// form1.value.itemName = '' |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// itemNumber.value = '' |
|
|
|
// form1.value.itemName = res.data.itemName |
|
|
|
// form1.value.deliveryQty = res.data.deliveryQty |
|
|
|
// form1.value.applyQty = res.data.applyQty |
|
|
|
// // 判断是否有帐外库 |
|
|
|
// locationItem.value = res.data.list.filter(item=>item.isInAccount==='FALSE')[0] |
|
|
|
// if(locationItem.value){ |
|
|
|
// form1.value.areaNumber = locationItem.value.areaNumber |
|
|
|
// form1.value.locationNumber = locationItem.value.locationNumber |
|
|
|
// isShow.value =false |
|
|
|
// }else{ |
|
|
|
// form1.value.areaNumber = '' |
|
|
|
// form1.value.locationNumber = '' |
|
|
|
// isShow.value =true |
|
|
|
// } |
|
|
|
// }).catch((err)=>{ |
|
|
|
// msg.value = err.msg |
|
|
|
// itemNumber.value = '' |
|
|
|
// form1.value.areaNumber = '' |
|
|
|
// form1.value.itemName = '' |
|
|
|
// form1.value.applyQty = '' |
|
|
|
// form1.value.deliveryQty = '' |
|
|
|
// locationList.value = []; |
|
|
|
// }) |
|
|
|
// } |
|
|
|
function blur1() { |
|
|
|
if (form1.value.itemNumber) { |
|
|
|
if (form.value.itemNumber) { |
|
|
|
getSparePartsInfo() |
|
|
|
} |
|
|
|
} |
|
|
@ -346,17 +379,9 @@ |
|
|
|
getSparePartsInfo() |
|
|
|
} |
|
|
|
onLoad(async(option) => { |
|
|
|
// if (option.id) this.form.id = option.id; |
|
|
|
// if (option.number) this.form.number = option.number; |
|
|
|
if (option.data && JSON.parse(decodeURIComponent(option.data)) && JSON.parse(decodeURIComponent(option |
|
|
|
.data)).id) { |
|
|
|
let formData = JSON.parse(decodeURIComponent(option.data)) |
|
|
|
form.value.supplierName = formData.supplierName |
|
|
|
form.value.number = formData.number |
|
|
|
form.value.id =formData.id |
|
|
|
} |
|
|
|
await getInLocationDetail() |
|
|
|
getReverterUser() |
|
|
|
}) |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|