半成品入库
This commit is contained in:
@@ -5,15 +5,15 @@
|
||||
<view class="zd_wrapper">
|
||||
<view class="input-wrap">
|
||||
<view class="input-label">服务器地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model.trim="addrip">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper">
|
||||
<!-- <view class="zd_wrapper">
|
||||
<view class="input-wrap">
|
||||
<view class="input-label">刷新时间(s)</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="zd_wrapper">
|
||||
<view class="input-wrap">
|
||||
<view class="input-label" style="margin-right: 20upx;">客户标签打印</view>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">工序</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
@@ -51,10 +51,16 @@
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">点位</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val3 || !bar_code}" :disabled="disabled" @tap="toSure">确认入库</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val3 || !bar_code || !index2}" :disabled="disabled" @tap="toSure">确认入库</button>
|
||||
<button class="submit-button" @tap="toCancle">清空</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -63,7 +69,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getWork, BcpConfirm} from '@/utils/getData2.js'
|
||||
import {getWork, getPoint, BcpConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -75,8 +81,10 @@
|
||||
val2: '',
|
||||
val3: '',
|
||||
sale_id: '',
|
||||
options: [],
|
||||
index: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
bar_code: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
@@ -96,6 +104,7 @@
|
||||
},
|
||||
created () {
|
||||
this._getWork()
|
||||
this._getPoint()
|
||||
},
|
||||
methods: {
|
||||
getMater () {
|
||||
@@ -103,23 +112,36 @@
|
||||
url: '/pages/modules/SemifinishedMaterSearch'
|
||||
})
|
||||
},
|
||||
/** 选择器 */
|
||||
selectChange(e) {
|
||||
this.index = e
|
||||
/** 选择器1 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
/** 下拉框查询 */
|
||||
/** 选择器2 */
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
/** 工序下拉框查询 */
|
||||
async _getWork () {
|
||||
let res = await getWork()
|
||||
res.data.map(el => {
|
||||
this.$set('value', el.workprocedure_id)
|
||||
this.$set('text', el.workprocedure_name)
|
||||
this.$set(el, 'value', el.workprocedure_id)
|
||||
this.$set(el, 'text', el.workprocedure_name)
|
||||
})
|
||||
this.options = [...res.data]
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
/** 点位下拉框查询 */
|
||||
async _getPoint () {
|
||||
let res = await getPoint()
|
||||
res.data.map(el => {
|
||||
this.$set(el, 'value', el.point_code)
|
||||
this.$set(el, 'text', el.point_name)
|
||||
})
|
||||
this.options2 = [...res.data]
|
||||
},
|
||||
/** 确认 */
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val3 || !this.bar_code ) {
|
||||
if (!this.val1 || !this.val3 || !this.bar_code || !index2 ) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
@@ -129,8 +151,9 @@
|
||||
material_code: this.val2,
|
||||
qty: this.val3,
|
||||
sale_id: this.sale_id,
|
||||
workprocedure_id: this.index,
|
||||
bar_code: this.bar_code
|
||||
workprocedure_id: this.index1,
|
||||
bar_code: this.bar_code,
|
||||
point_code: this.index2
|
||||
}
|
||||
let res = await BcpConfirm(from)
|
||||
this.disabled = false
|
||||
@@ -148,8 +171,9 @@
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.sale_id = ''
|
||||
this.index = ''
|
||||
this.index1 = ''
|
||||
this.bar_code = ''
|
||||
this.index2 = ''
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.product_name}}</td>
|
||||
<td>{{e.net_weight}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -90,8 +89,8 @@
|
||||
/** grid查询 */
|
||||
async _getMaterial (e) {
|
||||
let res = await getMaterial(e, this.pageNum + '', this.pageSize + '')
|
||||
this.totalCount = res.size
|
||||
if (res.size > 0) {
|
||||
this.totalCount = res.totalCount
|
||||
if (res.totalCount > 0) {
|
||||
const dataMap = res.data
|
||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||
this.reload = false
|
||||
|
||||
@@ -96,3 +96,8 @@ export const BcpConfirm = (from) => request({
|
||||
url:'api/pda/hrBcp/iosIn/confirm',
|
||||
data: from
|
||||
})
|
||||
// 1.4点位下拉框
|
||||
export const getPoint = (sp) => request({
|
||||
url:'api/pda/hrBcp/iosIn/getPoint',
|
||||
data: {}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user