change
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -34,18 +35,18 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_code === pkId}">
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.task_type}}</td>
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.status}}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code2}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -61,7 +62,8 @@
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -85,27 +87,26 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList2" :key="i" @click="toCheck(e)" :class="{'checked': e.task_code === pkId}">
|
||||
<tr v-for="(e, i) in dataList2" :key="i">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.task_type}}</td>
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.status}}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code2}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('80')">确认移库</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !dataList.length || !dataList2.length}" :disabled="disabled" @tap="_materialBoxMoveConfirm">确认移库</button>
|
||||
<!-- <button class="zd-col-6 button-primary" @tap="searchList">查询</button> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -114,7 +115,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getStatusEnum, schBaseTask, saveCheckTask} from '@/utils/getData2.js'
|
||||
import {getMoveDocumentInfo, materialBoxMoveConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -127,17 +128,7 @@
|
||||
val2: '',
|
||||
dataList: [],
|
||||
dataList2: [],
|
||||
pkId: '',
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
mdid: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
@@ -145,64 +136,60 @@
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this._schBaseTask()
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this._getMoveDocumentInfo()
|
||||
}
|
||||
},
|
||||
async _schBaseTask () {
|
||||
let res = await schBaseTask(this.pageNum + '', this.pageSize + '', this.index, this.val1)
|
||||
if (res.code === '200') {
|
||||
this.totalCount = res.totalElements
|
||||
if (res.totalElements > 0) {
|
||||
const dataMap = res.content
|
||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||
this.reload = false
|
||||
handleChange2 (e) {
|
||||
if (e && !this.mdid && this.dataList.length) {
|
||||
this.dataList2 = []
|
||||
this._getMoveDocumentInfo2()
|
||||
}
|
||||
},
|
||||
async _getMoveDocumentInfo () {
|
||||
try {
|
||||
let res = await getMoveDocumentInfo('1', this.val1, this.mdid)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
this.mdid = ths.dataList[0].moveinvdtl_id
|
||||
if (this.dataList.length && this.mdid) {
|
||||
this._getMoveDocumentInfo2()
|
||||
}
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
if (this.totalCount == this.dataList.length) {
|
||||
this.reload = false
|
||||
this.status = 'noMore'
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _getMoveDocumentInfo2 () {
|
||||
try {
|
||||
let res = await getMoveDocumentInfo('2', this.val2, this.mdid)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList2 = [...res.data]
|
||||
} else {
|
||||
this.dataList2 = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList2 = []
|
||||
}
|
||||
},
|
||||
onReachBottom () {
|
||||
if (this.totalCount > this.dataList.length) {
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
this.pageNum++
|
||||
this._schBaseTask()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = e.e.task_code === this.pkId ? '' : e.task_code
|
||||
},
|
||||
async toSure (status) {
|
||||
async _materialBoxMoveConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
if (!this.dataList.length || !this.dataList2.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await saveCheckTask(this.pkId, status)
|
||||
if (res.code === '200') {
|
||||
this.index = ''
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
let res = await materialBoxMoveConfirm(this.dataList, this.dataList2)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user