料桶入库
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-col-12">
|
<view class="zd-col-12">
|
||||||
<!-- <search-box v-model="code" @handleChange="handleChange1" @handleDel="handleDel1" /> -->
|
<!-- <search-box v-model="code" @handleChange="handleChange1" @handleDel="handleDel1" /> -->
|
||||||
<input type="text" class="filter_input" v-model="val3">
|
<input type="text" class="filter_input" v-model="val3" disabled>
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="toSearch">获取重量</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="toSearch">获取重量</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -63,15 +63,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.group_id}">
|
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.workorder_id}">
|
||||||
<td>{{e.material_name}}</td>
|
<td>{{e.workorder_code}}</td>
|
||||||
<td>{{e.qty}}</td>
|
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.pcsn}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.struct_code}}</td>
|
<td>{{e.workorder_status}}</td>
|
||||||
<td>{{e.qty_unit_name}}</td>
|
<td>{{e.operator}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.create_name}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.plan_qty}}</td>
|
||||||
|
<td>{{e.real_qty}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" @tap="seachList">查询工单</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2}" @tap="seachList">查询工单</button>
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !dataList.length}" @tap="_callMaterialConfirm">确认下料</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2 || !this.val3 || !this.val1 || !this.val2 || !this.pkId}" @tap="xlconfirm">确认下料</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {getRegion, linegetMaterialDtl, callMaterialConfirm} from '@/utils/getData3.js'
|
import {regionList, pointList, getWeight, getOrderList, downMaterial} from '@/utils/getData4.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -110,6 +110,7 @@
|
|||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
|
flag: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
reload: false,
|
reload: false,
|
||||||
status: 'more',
|
status: 'more',
|
||||||
@@ -128,12 +129,12 @@
|
|||||||
this.id = options.id
|
this.id = options.id
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._getRegion()
|
this._regionList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async _getRegion () {
|
async _regionList () {
|
||||||
try {
|
try {
|
||||||
let res = await getRegion('YZHJ')
|
let res = await regionList()
|
||||||
if (res) {
|
if (res) {
|
||||||
this.options = res
|
this.options = res
|
||||||
} else {
|
} else {
|
||||||
@@ -143,28 +144,44 @@
|
|||||||
this.options = []
|
this.options = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async _pointList (e) {
|
||||||
|
try {
|
||||||
|
let res = await pointList(e)
|
||||||
|
if (res) {
|
||||||
|
this.options2 = res
|
||||||
|
} else {
|
||||||
|
this.options2 =[]
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options2 = []
|
||||||
|
}
|
||||||
|
},
|
||||||
selectChange (e) {
|
selectChange (e) {
|
||||||
this.index = e
|
this.index = e
|
||||||
|
this._pointList(e)
|
||||||
},
|
},
|
||||||
selectChange2 (e) {
|
selectChange2 (e) {
|
||||||
this.index = e
|
this.index2 = e
|
||||||
},
|
},
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this._linegetMaterialDtl()
|
this._getOrderList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
seachList () {
|
seachList () {
|
||||||
|
if (!this.index2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this._linegetMaterialDtl()
|
this._getOrderList()
|
||||||
},
|
},
|
||||||
async _linegetMaterialDtl () {
|
async _getOrderList () {
|
||||||
let res = await linegetMaterialDtl(this.index)
|
let res = await getOrderList(this.index2, '2')
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
this.dataList = res.data
|
this.dataList = res.data
|
||||||
// this.totalCount = res.totalElements
|
// this.totalCount = res.totalElements
|
||||||
@@ -186,24 +203,50 @@
|
|||||||
this.status = 'loading'
|
this.status = 'loading'
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this._linegetMaterialDtl()
|
this._getOrderList()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else { //停止加载
|
} else { //停止加载
|
||||||
this.status = 'noMore'
|
this.status = 'noMore'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toChek (e) {
|
toChek (e) {
|
||||||
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
||||||
this.pkObj = this.pkId === e.group_id ? e : {}
|
this.pkObj = this.pkId === e.workorder_id ? e : {}
|
||||||
},
|
},
|
||||||
async _callMaterialConfirm () {
|
async _getWeight () {
|
||||||
|
if (!this.index2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let res = await getWeight(this.index2, this.pkId)
|
||||||
|
if (res.code === '200') {
|
||||||
|
this.val3 = res.data.weight
|
||||||
|
this.flag = res.data.flag
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xlconfirm () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.dataList.length) {
|
if (!this.index2 || !this.val3 || !this.val1 || !this.val2 || !this.pkId) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.flag === '2') {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否确认以重量:' + this.val3 + '提交?',
|
||||||
|
confirmColor: '#ff6a00',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this._downMaterial()
|
||||||
|
} else if (res.cancel) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _downMaterial () {
|
||||||
try {
|
try {
|
||||||
let res = await callMaterialConfirm(this.index, this.val1, this.pkObj)
|
let res = await downMaterial(this.pkId, this.index, this.val3, this.index2, this.val1, this.val2)
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@@ -45,15 +45,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.group_id}">
|
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.workorder_id}">
|
||||||
<td>{{e.material_name}}</td>
|
<td>{{e.workorder_code}}</td>
|
||||||
<td>{{e.qty}}</td>
|
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.pcsn}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.struct_code}}</td>
|
<td>{{e.workorder_status}}</td>
|
||||||
<td>{{e.qty_unit_name}}</td>
|
<td>{{e.operator}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.create_name}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.plan_qty}}</td>
|
||||||
|
<td>{{e.real_qty}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" @tap="seachList">查询工单</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2}" @tap="seachList">查询工单</button>
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !dataList.length}" @tap="_callMaterialConfirm">确认下料</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index || !this.index2 || !this.val1 || !this.pkId}" @tap="_jbReturnMaterial">解包退料</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {getRegion, linegetMaterialDtl, callMaterialConfirm} from '@/utils/getData3.js'
|
import {regionList, pointList, getOrderList, jbReturnMaterial} from '@/utils/getData4.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -108,12 +108,12 @@
|
|||||||
this.id = options.id
|
this.id = options.id
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._getRegion()
|
this._regionList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async _getRegion () {
|
async _regionList () {
|
||||||
try {
|
try {
|
||||||
let res = await getRegion('YZHJ')
|
let res = await regionList()
|
||||||
if (res) {
|
if (res) {
|
||||||
this.options = res
|
this.options = res
|
||||||
} else {
|
} else {
|
||||||
@@ -123,28 +123,44 @@
|
|||||||
this.options = []
|
this.options = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async _pointList (e) {
|
||||||
|
try {
|
||||||
|
let res = await pointList(e)
|
||||||
|
if (res) {
|
||||||
|
this.options2 = res
|
||||||
|
} else {
|
||||||
|
this.options2 =[]
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options2 = []
|
||||||
|
}
|
||||||
|
},
|
||||||
selectChange (e) {
|
selectChange (e) {
|
||||||
this.index = e
|
this.index = e
|
||||||
|
this._pointList(e)
|
||||||
},
|
},
|
||||||
selectChange2 (e) {
|
selectChange2 (e) {
|
||||||
this.index = e
|
this.index2 = e
|
||||||
},
|
},
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this._linegetMaterialDtl()
|
this._getOrderList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
seachList () {
|
seachList () {
|
||||||
|
if (!this.index2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this._linegetMaterialDtl()
|
this._getOrderList()
|
||||||
},
|
},
|
||||||
async _linegetMaterialDtl () {
|
async _getOrderList () {
|
||||||
let res = await linegetMaterialDtl(this.index)
|
let res = await getOrderList(this.index2, '2')
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
this.dataList = res.data
|
this.dataList = res.data
|
||||||
// this.totalCount = res.totalElements
|
// this.totalCount = res.totalElements
|
||||||
@@ -166,24 +182,24 @@
|
|||||||
this.status = 'loading'
|
this.status = 'loading'
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this._linegetMaterialDtl()
|
this._getOrderList()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else { //停止加载
|
} else { //停止加载
|
||||||
this.status = 'noMore'
|
this.status = 'noMore'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toChek (e) {
|
toChek (e) {
|
||||||
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
||||||
this.pkObj = this.pkId === e.group_id ? e : {}
|
this.pkObj = this.pkId === e.workorder_id ? e : {}
|
||||||
},
|
},
|
||||||
async _callMaterialConfirm () {
|
async _jbReturnMaterial () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.dataList.length) {
|
if (!this.index || !this.index2 || !this.val1 || !this.pkId) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await callMaterialConfirm(this.index, this.val1, this.pkObj)
|
let res = await jbReturnMaterial(this.index, this.index2, this.pkId)
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" @tap="seachList">查询工单</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !index2}" @tap="seachList">查询工单</button>
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !index2 || !pkId}" @tap="_callMaterial">开工</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !index2 || !pkId}" @tap="_callMaterial">开工</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -134,6 +134,9 @@
|
|||||||
this.index2 = e
|
this.index2 = e
|
||||||
},
|
},
|
||||||
seachList () {
|
seachList () {
|
||||||
|
if (!this.index2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_bindOrUnbind('1')">检查站点</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_checkStruct">检查站点</button>
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_bindOrUnbind('0')">确认放置</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !val1 || !val2 || flag === '2'}" :disabled="disabled2" @tap="_confirmSet">确认放置</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {bindOrUnbind} from '@/utils/getData3.js'
|
import {checkStruct, confirmSet} from '@/utils/getData4.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -47,7 +47,9 @@
|
|||||||
title: '',
|
title: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
|
flag: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
disabled2: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
@@ -61,15 +63,22 @@
|
|||||||
this.val2 = ''
|
this.val2 = ''
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
},
|
},
|
||||||
async _bindOrUnbind (type) {
|
clearUp2 () {
|
||||||
|
this.val1 = ''
|
||||||
|
this.val2 = ''
|
||||||
|
this.disabled2 = false
|
||||||
|
},
|
||||||
|
async _checkStruct () {
|
||||||
|
console.log(1111)
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.val2) {
|
if (!this.val1) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await bindOrUnbind(this.val1, this.val2, type)
|
let res = await checkStruct(this.val1)
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
|
this.flag = res.data.flag
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -85,6 +94,31 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async _confirmSet () {
|
||||||
|
this.disabled2 = true
|
||||||
|
if (!this.val1 || !this.val2 || this.flag === '2') {
|
||||||
|
this.disabled2 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await confirmSet(this.val1, this.val2)
|
||||||
|
if (res.code === '200') {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.clearUp()
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.disabled2 = false
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled2 = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user