二楼功能
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">单据编码</span>
|
||||
<span class="filter_label">用料清单编号</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<search-box
|
||||
@@ -34,8 +34,8 @@
|
||||
<th class="td_3"><view class="td_3">物料名称</view></th>
|
||||
<th>物料编码</th>
|
||||
<th>数量</th>
|
||||
<th>批次号</th>
|
||||
<th>单位</th>
|
||||
<th>批次号</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -44,8 +44,8 @@
|
||||
<td class="td_3">{{e.material_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.unit_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.unit_id}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<view class="zd-col-16">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -25,11 +26,34 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>站点编码</th>
|
||||
<th>站点名称</th>
|
||||
<th>绑定状态</th>
|
||||
<th>绑定货架号</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.code}}</td>
|
||||
<td>{{e.name}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-primary" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('1')">绑定</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('0')">解绑</button>
|
||||
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type === '0'" class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('1')">绑定</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type === '1'" class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('0')">解绑</button>
|
||||
<button v-if="!dataList.length" class="zd-col-16 button-primary button-info">绑定 / 解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -37,7 +61,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {bindOrUnbind} from '@/utils/getData2.js'
|
||||
import {getPointStatus, bindOrUnbind} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -48,17 +72,28 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled: false
|
||||
disabled: false,
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getPointStatus(e)
|
||||
}
|
||||
},
|
||||
async _getPointStatus (e) {
|
||||
let res = await getPointStatus(e)
|
||||
this.dataList.push(res)
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
this.dataList = []
|
||||
},
|
||||
toSure (type) {
|
||||
this.disabled = true
|
||||
@@ -71,9 +106,6 @@
|
||||
async _bindOrUnbind (type) {
|
||||
try {
|
||||
let res = await bindOrUnbind(this.val1, this.val2, type)
|
||||
if (res.code === '200') {
|
||||
this.toEmpty()
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
||||
@@ -229,7 +229,7 @@ export const getCtuOrderList = (scode, bcode) => request({
|
||||
})
|
||||
export const ctuOutConfirm = (scode, bcode, arr) => request({
|
||||
url:'api/pda/outStorage/ctuOutConfirm',
|
||||
data: {site_code: scode, bill_code: bcode, form_data: arr}
|
||||
data: {site_code: scode, bill_code: bcode, children: arr}
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -242,6 +242,10 @@ export const takeConfirm = (scode, bcode) => request({
|
||||
/**
|
||||
* 二楼货架绑定
|
||||
*/
|
||||
export const getPointStatus = (scode) => request({
|
||||
url:'api/point/getPointStatus',
|
||||
data: {site_code: scode}
|
||||
})
|
||||
export const bindOrUnbind = (scode, bcode, mode) => request({
|
||||
url:'api/point/bindOrUnbind',
|
||||
data: {site_code: scode, shelf_code: bcode, mode: mode}
|
||||
|
||||
@@ -250,4 +250,8 @@ export const ctuOutConfirm = () => {
|
||||
msg: 'ok'
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const getPointStatus = () => {
|
||||
let res = {code: 'a', name: 'ldjlfjl', lock_type: '0'}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user