手工组盘加功能
This commit is contained in:
@@ -68,6 +68,22 @@
|
||||
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">客户编码</span>
|
||||
</view>
|
||||
<view class="zd-col-16 filter_select">
|
||||
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">合同编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input type="text" class="filter_input" v-model="contractCode">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
@@ -81,7 +97,7 @@
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {getMaterCode, groupPlateTwo} from '@/utils/getData.js'
|
||||
import {getMaterCode, getCust, groupPlateTwo} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -98,11 +114,15 @@
|
||||
qty: null,
|
||||
index: '',
|
||||
options: Array.from({length: 14}, (_, i) => i + 1).filter(num => num !== 8 && num !== 13).map(num => ({value: `A${num}`,text: `A${num}`})),
|
||||
index1: '',
|
||||
options1: [],
|
||||
contractCode: null,
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._getCust()
|
||||
},
|
||||
methods: {
|
||||
async _getMaterCode () {
|
||||
@@ -116,13 +136,29 @@
|
||||
this.initData = {}
|
||||
}
|
||||
},
|
||||
async _getCust () {
|
||||
try {
|
||||
let res = await getCust()
|
||||
if (res && res.data) {
|
||||
this.options1 = [...res.data]
|
||||
this.options1.map(el => {
|
||||
this.$set(el, 'value', el.cust_code)
|
||||
this.$set(el, 'text', el.cust_name)
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.options1 = []
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.code = ''
|
||||
this.vcode = ''
|
||||
this.initData = {}
|
||||
this.pcsn = null
|
||||
this.qty = null
|
||||
this.index = null
|
||||
this.index = ''
|
||||
this.index1 = ''
|
||||
this.contractCode = null
|
||||
this.disabled = false
|
||||
},
|
||||
// 组盘确认
|
||||
@@ -133,7 +169,7 @@
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await groupPlateTwo(this.vcode, this.code, this.initData.material_name, this.initData.material_spec, this.pcsn, this.qty, this.index)
|
||||
let res = await groupPlateTwo(this.vcode, this.code, this.initData.material_name, this.initData.material_spec, this.pcsn, this.qty, this.index, this.index1, this.contractCode)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
Reference in New Issue
Block a user