弹窗需求
This commit is contained in:
@@ -14,9 +14,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jcflexstart table-title_wraper">
|
||||
<text>采购入库</text>
|
||||
</view>
|
||||
<view class="zd-row jcflexstart table-title_wraper">{{title}}</view>
|
||||
<view class="grid-wrap">
|
||||
<view class="table-wrap">
|
||||
<view class="zd-row zd-th-wraper">
|
||||
@@ -76,7 +74,7 @@
|
||||
<view class="zd-row mgt40">
|
||||
<view class="zd-col-12 zd-row jcflexstart">
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr2.length === 0}" :disabled="disabled2" @tap="_easOutInBillDetailUpdate">多库位修改</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr2.length !== 1}" :disabled="disabled1" @tap="toSure">单库位修改</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr2.length !== 1}" @tap="_queryInventoryInfo">单库位修改</button>
|
||||
</view>
|
||||
<view class="zd-col-12">
|
||||
<pagination :total="totalCount2" :page-size="queryParams2.pageSize" :current-page="currentPage2" @page-change="handlePageChange2" />
|
||||
@@ -87,26 +85,67 @@
|
||||
</view>
|
||||
<pagination v-show="dataList1.length > 0" :total="totalCount1" :page-size="queryParams1.pageSize" :current-page="currentPage1" @page-change="handlePageChange1" />
|
||||
</view>
|
||||
<view class="pop-wraper" :class="show ? 'popshow' : 'pophide'">
|
||||
<view class="allwidth pop-title">库位修改</view>
|
||||
<view class="pop-grid-wraper">
|
||||
<view class="zd-row zd-sec-th-wraper zd-pop-th-wraper">
|
||||
<view class="zd-col-2 zd-sec-th"><text>序号</text></view>
|
||||
<view class="zd-col-4 zd-sec-th"><text>出库单号</text></view>
|
||||
<view class="zd-col-4 zd-sec-th"><text>物料编号</text></view>
|
||||
<view class="zd-col-5 zd-sec-th"><text>物料名称</text></view>
|
||||
<view class="zd-col-5 zd-sec-th"><text>实际库位</text></view>
|
||||
<view class="zd-col-4 zd-sec-th"><text>数量</text></view>
|
||||
</view>
|
||||
<view class="zd-row zd-td-wraper" v-for="(ele, t) in dataList3" :key="ele.id">
|
||||
<view class="zd-col-2 zd-sec-td zd-pop-td"><text>{{t+1}}</text></view>
|
||||
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.code}}</text></view>
|
||||
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.code}}</text></view>
|
||||
<view class="zd-col-5 zd-sec-td zd-pop-td"><text>{{ele.code}}</text></view>
|
||||
<view class="zd-col-5 zd-sec-td zd-pop-td">
|
||||
<scan-input
|
||||
v-model="ele.ckmc"
|
||||
/>
|
||||
</view>
|
||||
<view class="zd-col-4 zd-sec-td zd-pop-td">
|
||||
<input v-show="!ele.checked" type="number" class="pop-input" v-model="ele.qty" @blur="handleBlur(ele)">
|
||||
<text v-show="ele.checked">{{ele.qty}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jcenter">
|
||||
<view class="zd-col-4">
|
||||
<button class="confirm-button confirm-button_cancle" @tap="show = false">取消</button>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': dataList3.length === 0}" :disabled="disabled3" @tap="_easOutInBillDetailUpdate1">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="modal" @click.stop="show = false"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import {easOutInBillPage, easOutInBillDetailPage, easOutInBillUpdate, easOutInBillDetailUpdate} from '@/utils/getData2.js'
|
||||
import {easOutInBillPage, easOutInBillDetailPage, easOutInBillUpdate, easOutInBillDetailUpdate, queryInventoryInfo} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
ScanInput,
|
||||
Pagination
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
id: '',
|
||||
val1: '',
|
||||
dataList1: [],
|
||||
dataList2: [],
|
||||
dataList3: [],
|
||||
pkId: '',
|
||||
checkArr1: [],
|
||||
disabled1: false,
|
||||
@@ -124,7 +163,9 @@
|
||||
},
|
||||
currentPage2: 1,
|
||||
checkArr2: [],
|
||||
disabled2: false
|
||||
disabled2: false,
|
||||
show: false,
|
||||
disabled3: false
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -137,6 +178,7 @@
|
||||
},
|
||||
onLoad (options) {
|
||||
this.id = options.id
|
||||
this.title = options.name
|
||||
},
|
||||
methods: {
|
||||
toSearch () {
|
||||
@@ -244,6 +286,53 @@
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
async _queryInventoryInfo () {
|
||||
let res = await queryInventoryInfo(this.checkArr2)
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'yqty', el.qty)
|
||||
})
|
||||
this.dataList3 = [...res.result]
|
||||
this.show = true
|
||||
},
|
||||
handleBlur (ele) {
|
||||
console.log(this.dataList3)
|
||||
ele.checked = true
|
||||
let index = ''
|
||||
let obj = {}
|
||||
this.dataList3.map((e, i) => {
|
||||
if (e.id === ele.id) {
|
||||
index = i
|
||||
obj = Object.assign({}, e, {'checked': false}, {'ckmc': ''}, {id: e.id + Math.random() * 1000}, {qty: Number(e.yqty) - Number(ele.qty)}, {yqty: Number(e.yqty) - Number(ele.qty)})
|
||||
}
|
||||
})
|
||||
this.dataList3.splice(index+1, 0, obj)
|
||||
this.dataList3 = [...this.dataList3]
|
||||
},
|
||||
async _easOutInBillDetailUpdate1 () {
|
||||
this.disabled3 = true
|
||||
if (this.dataList3.length === 0) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await easOutInBillDetailUpdate(this.dataList3)
|
||||
this.disabled3 = false
|
||||
this.show = false
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._easOutInBillDetailPage()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user