细节修改

This commit is contained in:
2024-05-30 16:34:29 +08:00
parent 615fe82be5
commit d3ddb47eae
6 changed files with 1105 additions and 763 deletions

View File

@@ -12,29 +12,29 @@
<view class="zdrow-wrap">
<view class="zd-row sticky zd-th-wraper">
<view class="zd-col-1 zd-th"><text>序号</text></view>
<view class="zd-col-3 zd-th"><text>单据编号</text></view>
<view class="zd-col-2 zd-th nowrap"><text>业务日期</text></view>
<view class="zd-col-3 zd-th"><text>调入组织</text></view>
<view class="zd-col-3 zd-th"><text>调出组织</text></view>
<view class="zd-col-2 zd-th"><text>调入仓库</text></view>
<view class="zd-col-2 zd-th"><text>调出仓库</text></view>
<view class="zd-col-2 zd-th"><text class="fontcol1">单据编号</text></view>
<view class="zd-col-2 zd-th"><text>业务日期</text></view>
<view class="zd-col-2 zd-th"><text>调入组织</text></view>
<view class="zd-col-2 zd-th"><text>调出组织</text></view>
<view class="zd-col-3 zd-th"><text>调入仓库</text></view>
<view class="zd-col-3 zd-th"><text>调出仓库</text></view>
<view class="zd-col-2 zd-th"><text>状态</text></view>
<view class="zd-col-2 zd-th nowrap"><text>计划调入日期</text></view>
<view class="zd-col-2 zd-th"><text>备注</text></view>
<view class="zd-col-3 zd-th"><text>备注</text></view>
<view class="zd-col-2 zd-th">更多</view>
</view>
<view class="zd-td-wraper" v-for="(e, i) in dataList1" :key="e.id">
<view class="zd-row" :class="{'zd-td-checked': pkId === e.id}" @tap="toCollapse(e)">
<view class="zd-col-1 zd-td"><text>{{i+1}}</text></view>
<view class="zd-col-3 zd-td fontcol1"><text>{{e.djbh}}</text></view>
<view class="zd-col-2 zd-td nowrap"><text>{{e.ywrq}}</text></view>
<view class="zd-col-3 zd-td"><text>{{e.drkcmc}}</text></view>
<view class="zd-col-3 zd-td"><text>{{e.dckcmc}}</text></view>
<view class="zd-col-2 zd-td"><text>{{e.drckmc}}</text></view>
<view class="zd-col-2 zd-td"><text>{{e.dcckmc}}</text></view>
<view class="zd-col-2 zd-td fontcol1"><text>{{e.djbh}}</text></view>
<view class="zd-col-2 zd-td"><text>{{e.ywrq}}</text></view>
<view class="zd-col-2 zd-td"><text>{{e.drkcmc}}</text></view>
<view class="zd-col-2 zd-td"><text>{{e.dckcmc}}</text></view>
<view class="zd-col-3 zd-td"><text>{{e.drckmc}}</text></view>
<view class="zd-col-3 zd-td"><text>{{e.dcckmc}}</text></view>
<view class="zd-col-2 zd-td"><text class="fontbg1">{{e.djzt}}</text></view>
<view class="zd-col-2 zd-td"><text>{{e.jhdrrq}}</text></view>
<view class="zd-col-2 zd-td nowrap"><text>{{e.flbz}}</text></view>
<view class="zd-col-3 zd-td"><text>{{e.flbz}}</text></view>
<view class="zd-col-2 zd-td" @tap.stop="getDetails(3,e)">
<uni-icons type="more-filled" size="14" color="#fff"></uni-icons>
</view>
@@ -47,7 +47,7 @@
<tr>
<th>序号</th>
<th v-if="pkObj.djzt !== '审核后'">选择</th>
<th>物料编码</th>
<th><text class="fontcol1">物料编码</text></th>
<th>物料名称</th>
<th>规格型号</th>
<th>计里单位</th>
@@ -67,33 +67,45 @@
<tr v-for="(el, j) in dataList2" :key="el.id">
<td>{{j+1}}</td>
<td><view class="zd-checkbox" :class="{'zd-checkbox_active': el.checked}" @tap="toCheck2(el)"></view></td>
<td>{{el.wlbm}}</td>
<td><view class="fontcol1">{{el.wlbm}}</view></td>
<td>{{el.wlmc}}</td>
<td>{{el.ggxh}}</td>
<td>{{el.jldw}}</td>
<td><input class="td_input" type="number" v-model="el.sl" @blur="_allocationBillUpdate(el)" /></td>
<td>{{el.kclx}}</td>
<td>{{el.kczt}}</td>
<td @tap.stop="checkWarehouse(1, '调出仓库', el)"><input class="td_input" type="text" v-model="el.dcckmc" readonly /></td>
<td @tap.stop="checkWarehouse(1, '调出仓库', el)">
<view class="zd-row td_change">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.dcckbm}}</view>
</view>
</td>
<td>
<view class="td_scan_wraper">
<scan-input v-model="el.dckwmc" @handleChange="_allocationBillUpdate(el)" />
<scan-input v-model="el.dckwbm" @handleChange="_allocationBillUpdate(el)" />
</view>
</td>
<td @tap.stop="checkWarehouse(2, '调入仓库', el)">
<view class="zd-row td_change">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.drckbm}}</view>
</view>
</td>
<td @tap.stop="checkWarehouse(2, '调入仓库', el)"><input class="td_input" type="text" v-model="el.drckmc" readonly /></td>
<td>
<view class="td_scan_wraper">
<scan-input v-model="el.drkwmc" @handleChange="_allocationBillUpdate(el)" />
<scan-input v-model="el.drkwbm" @handleChange="_allocationBillUpdate(el)" />
</view>
</td>
<td>
<view class="zd-row grid-data">
<uni-datetime-picker type="date" v-model="el.jhdrrq" @change="_allocationBillUpdate(el)" />
<td @tap.stop="openCalendar(1,el)">
<view class="zd-row td_change">
<uni-icons type="calendar" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.jhdrrq}}</view>
</view>
</td>
<td>
<view class="zd-row grid-data">
<uni-datetime-picker type="date" v-model="el.jhdcrq" @change="_allocationBillUpdate(el)" />
<td @tap.stop="openCalendar(2,el)">
<view class="zd-row td_change">
<uni-icons type="calendar" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.jhdcrq}}</view>
</view>
</td>
<td @tap.stop="getDetails(3,el)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></td>
@@ -109,14 +121,22 @@
<td>{{el.sl}}</td>
<td>{{el.kclx}}</td>
<td>{{el.kczt}}</td>
<td>{{el.dcckmc}}</td>
<td>{{el.dckwmc}}</td>
<td>{{el.drckmc}}</td>
<td>{{el.drckmc}}</td>
<td>
<view class="zd-row">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.dcckbm}}</view>
</view>
</td>
<td>{{el.dckwbm}}</td>
<td>
<view class="zd-row">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.drckbm}}</view>
</view>
</td>
<td>{{el.drkwbm}}</td>
<td>{{el.jhdrrq}}</td>
<td>{{el.jhdcrq}}</td>
<td>{{el.fzsx}}</td>
<td>{{el.gzh}}</td>
<td @tap.stop="getDetails(3,el)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></td>
</tr>
</tbody>
@@ -148,9 +168,12 @@
<view class="pop-wraper" :class="{'popshow': show, 'pophide': !show}">
<view class="allwidth pop-title">修改{{modalObj.title}}</view>
<view class="zd-row jcenter kwcode_wraper">
<view class="zd-col-12 select_wraper">
<view v-if="modalObj.type === 1 || modalObj.type === 2" class="zd-col-12 select_wraper">
<zxz-uni-data-select placeholder="请选择仓库名称" v-model="value" filterable :localdata="range"></zxz-uni-data-select>
</view>
<view v-if="modalObj.type === 3 || modalObj.type === 4" class="zd-col-12 grid-data">
<uni-datetime-picker type="date" v-model="date" @change="_allocationBillUpdate(el)" />
</view>
</view>
<view class="mgb20 zd-row jcenter">
<view class="zd-col-10 zd-row">
@@ -160,6 +183,7 @@
</view>
</view>
<view v-if="show" class="modal" @click.stop="show = false"></view>
<uni-calendar ref="calendar" :insert="false" :date="date" @confirm="calendarConfirm" />
</view>
</template>
@@ -193,7 +217,7 @@
dataList2: [],
totalCount2: 0,
queryParams2:{
pageSize: 20,
pageSize: 200,
pageNum: 1
},
currentPage2: 1,
@@ -203,6 +227,7 @@
detailObj: {},
value: '',
range: [],
date: '',
show: false,
modalObj: {},
disabled: false
@@ -291,7 +316,7 @@
this.dataList2 = []
if (this.pkId === e.djid) {
this.queryParams2 = {
pageSize: 20,
pageSize: 200,
pageNum: 1
}
this.currentPage2 = 1
@@ -318,12 +343,10 @@
async _allocationBillUpdate (e) {
try {
let res = await allocationBillUpdate(e)
if (res.code !== 1) {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
uni.showToast({
title: res.desc,
icon: 'none'
})
} catch (e) {
console.log(e)
}
@@ -332,26 +355,34 @@
checkWarehouse (type, title, e) {
this.modalObj = {type: type, title: title, id: e.flid}
if (type === 1) {
this.value = e.dcckmc
this.value = e.dcckbm
} else if (type === 2) {
this.value = e.drckmc
this.value = e.drckbm
}
this.show = true
},
// 修改调出仓库确定
modalConfirm () {
let mc = ''
this.range.map(el => {
if (el.value === this.value) {
mc = el.text
}
})
let obj = {}
if (this.modalObj.type === 1) {
this.dataList2.map(e => {
if (e.flid === this.modalObj.id) {
e.dcckmc = this.value
e.dcckbm = this.value
e.dcckmc = mc
obj = e
}
})
} else if (this.modalObj.type === 2) {
this.dataList2.map(e => {
if (e.flid === this.modalObj.id) {
e.drckmc = this.value
e.drckbm = this.value
e.drckmc = mc
obj = e
}
})
@@ -359,6 +390,35 @@
this.show = false
this._allocationBillUpdate(obj)
},
// 修改日期
openCalendar (type, e) {
this.modalObj = {type: type, id: e.flid}
this.$refs.calendar.open()
if (type === 1) {
this.date = e.jhdrrq
} else if (type === 2) {
this.date = e.jhdcrq
}
},
calendarConfirm (e) {
let obj = {}
if (this.modalObj.type === 1) {
this.dataList2.map(el => {
if (el.flid === this.modalObj.id) {
el.jhdrrq = e.fulldate
obj = el
}
})
} else if (this.modalObj.type === 2) {
this.dataList2.map(el => {
if (el.flid === this.modalObj.id) {
el.jhdcrq = e.fulldate
obj = el
}
})
}
this._allocationBillUpdate(obj)
},
// 点击直接调拨按钮
async _allocationBillConfirm () {
this.disabled = true
@@ -367,10 +427,16 @@
return
}
try {
let res = allocationBillConfirm(this.checkArr)
let arr = []
this.checkArr.map(el => {
let {djid, djbh, ywrq, btbz, flxh, flid, jldw, sl, dcckbm, dckwbm, drckbm, drkwbm, jhdrrq, jhdcrq, flbz} = {...el}
let obj = {djid, djbh, ywrq, btbz, flxh, flid, jldw, sl, dcckbm, dckwbm, drckbm, drkwbm, jhdrrq, jhdcrq, flbz}
arr.push(obj)
})
let res = await allocationBillConfirm(arr)
if (res.code === 1) {
this.queryParams2 = {
pageSize: 10,
pageSize: 200,
pageNum: 1
}
this.currentPage2 = 1

View File

@@ -12,7 +12,7 @@
<view class="zdrow-wrap">
<view class="zd-row sticky zd-th-wraper">
<view class="zd-col-1 zd-th"><text>序号</text></view>
<view class="zd-col-3 zd-th"><text>送货单号</text></view>
<view class="zd-col-3 zd-th"><text class="fontcol1">送货单号</text></view>
<view class="zd-col-2 zd-th"><text>送货日期</text></view>
<view class="zd-col-2 zd-th"><text>提交时间</text></view>
<view class="zd-col-2 zd-th"><text>采购公司</text></view>
@@ -68,7 +68,7 @@
<tr v-for="(el, j) in dataList2" :key="el.id">
<td>{{j+1}}</td>
<td><view class="zd-checkbox" :class="{'zd-checkbox_active': el.checked}" @tap="toCheck2(el)"></view></td>
<td>{{el.cgbh}}</td>
<td><view class="fontcol1">{{el.cgbh}}</view></td>
<td>{{el.wlbm}}</td>
<td>{{el.wlmc}}</td>
<td>{{el.ggxh}}</td>
@@ -78,7 +78,12 @@
<td>{{el.zzmc}}</td>
<td>{{el.num}}</td>
<td><input class="td_input" type="number" v-model="el.shsl" @blur="_receiptBillUpdate(el)" /></td>
<td @tap.stop="checkWarehouse(1, '收货仓库', el)"><input class="td_input" type="text" v-model="el.ckbm" readonly /></td>
<td @tap.stop="checkWarehouse(1, '收货仓库', el)">
<view class="zd-row td_change">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.ckbm}}</view>
</view>
</td>
<td>
<view class="td_scan_wraper">
<scan-input v-model="el.kwbm" @handleChange="_receiptBillUpdate(el)" />
@@ -100,7 +105,12 @@
<td>{{el.zzmc}}</td>
<td>{{el.num}}</td>
<td>{{el.shsl}}</td>
<td>{{el.ckbm}}</td>
<td>
<view class="zd-row">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
<view class="mgl10">{{el.ckbm}}</view>
</view>
</td>
<td>{{el.kwbm}}</td>
<td @tap.stop="getDetails(4,el)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></td>
</tr>
@@ -178,7 +188,7 @@
dataList2: [],
totalCount2: 0,
queryParams2:{
pageSize: 20,
pageSize: 200,
pageNum: 1
},
currentPage2: 1,
@@ -276,7 +286,7 @@
this.dataList2 = []
if (this.pkId === e.djid) {
this.queryParams2 = {
pageSize: 20,
pageSize: 200,
pageNum: 1
}
this.currentPage2 = 1
@@ -317,26 +327,24 @@
checkWarehouse (type, title, e) {
this.modalObj = {type: type, title: title, id: e.flid}
if (type === 1) {
this.value = e.dcckmc
} else if (type === 2) {
this.value = e.drckmc
this.value = e.ckbm
}
this.show = true
},
// 修改调出仓库确定
modalConfirm () {
let mc = ''
this.range.map(el => {
if (el.value === this.value) {
mc = el.text
}
})
let obj = {}
if (this.modalObj.type === 1) {
this.dataList2.map(e => {
if (e.flid === this.modalObj.id) {
e.dcckmc = this.value
obj = e
}
})
} else if (this.modalObj.type === 2) {
this.dataList2.map(e => {
if (e.flid === this.modalObj.id) {
e.drckmc = this.value
e.ckbm = this.value
e.ckmc = mc
obj = e
}
})
@@ -344,7 +352,7 @@
this.show = false
this._receiptBillUpdate(obj)
},
// 点击直接调拨按钮
// 点击确认收货按钮
async _receiptBillConfirm () {
this.disabled = true
if (!this.checkArr.length) {
@@ -352,10 +360,16 @@
return
}
try {
let res = receiptBillConfirm(this.checkArr)
let arr = []
this.checkArr.map(el => {
let {djid, djbh, ywrq, shsl, zzbm, ckbm, kwbm, flid, flxh, bz, btbz} = {...el}
let obj = {djid, djbh, ywrq, shsl, zzbm, ckbm, kwbm, flid, flxh, bz, btbz}
arr.push(obj)
})
let res = receiptBillConfirm(arr)
if (res.code === 1) {
this.queryParams2 = {
pageSize: 10,
pageSize: 200,
pageNum: 1
}
this.currentPage2 = 1