Browse Source

备件归还和出库bug

master
zhang_li 8 months ago
parent
commit
a48421b54b
  1. 2
      src/manifest.json
  2. 2
      src/pages/index.vue
  3. 9
      src/pages/outLocation/addForm.vue
  4. 13
      src/pages/sparePartsReturn/addForm.vue

2
src/manifest.json

@ -1,5 +1,5 @@
{
"name" : "鸿翔",
"name" : "富维汽车镜",
"appid" : "__UNI__DA78BC9",
"description" : "",
"versionName" : "1.0.0",

2
src/pages/index.vue

@ -46,7 +46,7 @@
</u-row>
</view>
<view class="" v-if="menus1&&menus1.length>0">
<view class="title">采购入库11</view>
<view class="title">采购入库</view>
<u-row gutter="16" style="padding:0px 20rpx ;">
<block v-for="(item,index) in menus1" :key="index">
<u-col span="3" v-if="item.path == 'purchaseIn'">

9
src/pages/outLocation/addForm.vue

@ -84,7 +84,7 @@
</u-col>
</u-row>
</view>
<u-icon name="minus-circle" color="#aaaaaa" size="60" @click="delSpareParts(index)"></u-icon>
<u-icon name="minus-circle" color="#aaaaaa" size="60" @click="delSpareParts(item,index)"></u-icon>
</view>
<view class="add-btn">
<u-button type="primary" @click="open"><u-icon name="plus-circle" color="#ffffff"
@ -288,7 +288,12 @@
isPopupShow.value = false
}
//
function delSpareParts(index) {
function delSpareParts(item,index) {
let bol = form.value.itemNumbers.some(cur=>cur.itemNumber == item.itemNumber&&item.isInAccount == 'FALSE'&&cur.isInAccount == 'TRUE')
if(bol){
proxy.$modal.showToast('请先删除该备件得帐内库')
return;
}
form.value.itemNumbers.splice(index, 1)
}
function getLocation() {

13
src/pages/sparePartsReturn/addForm.vue

@ -243,8 +243,9 @@ const singleColumnShow = ref(false)
proxy.$modal.showToast('该库位属于帐内库,请选择帐外库')
return;
}
console.log(itemNumber.value)
if (itemNumber.value) {
proxy.$modal.showToast(msg.value)
proxy.$modal.showToast('该库位已绑定过其他备件')
return;
}
if (!form1.value.qty) {
@ -275,8 +276,12 @@ const singleColumnShow = ref(false)
function getLocation() {
locationApi.getLocation(form1.value.locationNumber).then(res => {
if(!res.data){
proxy.$modal.showToast(res.msg)
msg.value = res.msg
if(res.msg){
proxy.$modal.showToast(res.msg)
msg.value = res.msg
}else{
proxy.$modal.showToast('找不到该库位')
}
return;
}
locationItem.value = res.data
@ -335,7 +340,7 @@ const singleColumnShow = ref(false)
isShow.value =true
}
}).catch((err)=>{
msg.value = res.msg
msg.value = err.msg
itemNumber.value = ''
form1.value.areaNumber = ''
form1.value.itemName = ''

Loading…
Cancel
Save