需求修改

This commit is contained in:
蔡玲
2024-09-06 09:35:26 +08:00
parent b4f459a974
commit 20f8520be2
8 changed files with 137 additions and 38 deletions

View File

@@ -301,6 +301,9 @@ uni-button:after {
border: 2rpx solid #ff6a00; border: 2rpx solid #ff6a00;
border-radius: 10rpx; border-radius: 10rpx;
} }
.button-primary_s {
font-size: 28rpx;
}
.button-info, .submit-button[disabled] { .button-info, .submit-button[disabled] {
background-color: #c9c9c9; background-color: #c9c9c9;
border: 2rpx solid #c9c9c9; border: 2rpx solid #c9c9c9;

View File

@@ -13,7 +13,7 @@
@blur="handleBlur" @blur="handleBlur"
@confirm="handleSend"> @confirm="handleSend">
</view> </view>
<uni-icons v-show="scanList.length" class="mgr20" type="clear" size="24" color="#4e6ef2" @tap="toDel"></uni-icons> <uni-icons v-show="scanList.length" class="pdr10" type="clear" size="24" color="#666" @tap="toDel"></uni-icons>
<uni-icons type="scan" size="22" :color="focusState ? '#D7592F' : '#4e6ef2'" @tap="focusState=true"></uni-icons> <uni-icons type="scan" size="22" :color="focusState ? '#D7592F' : '#4e6ef2'" @tap="focusState=true"></uni-icons>
</view> </view>
<view v-show="scanList.length > 0 && show" class="scan_list_select"> <view v-show="scanList.length > 0 && show" class="scan_list_select">

View File

@@ -32,10 +32,10 @@
return { return {
userName: '', userName: '',
menuList: [ menuList: [
{title: '物料入库', icon: 'RF03', path: '/pages/manage/mater-in-storage'}, {title: '物料入库转运', icon: 'RF03', path: '/pages/manage/mater-in-storage'},
{title: '外协区空笼框送回', icon: 'RF01', path: '/pages/manage/empty-tray-back'}, {title: '外协区送回', icon: 'RF01', path: '/pages/manage/empty-tray-back'},
{title: '外协区空料架送回', icon: 'RF05', path: '/pages/manage/empty-material-racks-back'}, // {title: '外协区空料架送回', icon: 'RF05', path: '/pages/manage/empty-material-racks-back'},
{title: '物料转运', icon: 'RF02', path: '/pages/manage/material-transfer'}, // {title: '物料转运', icon: 'RF02', path: '/pages/manage/material-transfer'},
{title: '区域锁定', icon: 'RF06', path: '/pages/manage/area-lock'}, {title: '区域锁定', icon: 'RF06', path: '/pages/manage/area-lock'},
{title: '补空框', icon: 'RF04', path: '/pages/manage/fill-tray'}, {title: '补空框', icon: 'RF04', path: '/pages/manage/fill-tray'},
{title: '修改订单工序', icon: 'RF07', path: '/pages/manage/modify-process'} {title: '修改订单工序', icon: 'RF07', path: '/pages/manage/modify-process'}

View File

@@ -5,18 +5,34 @@
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-5"> <view class="zd-col-5">
<span class="filter_label">区域</span> <span class="filter_label">区域</span>
</view> </view>
<view class="zd-col-19 filter_select"> <view class="zd-col-19 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select> <uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">区域二</span>
</view>
<view class="zd-col-19 filter_select">
<uni-data-select v-model="index2" :localdata="options1"></uni-data-select>
</view>
</view>
<view class="zd-row">
<view class="zd-col-5">
<span class="filter_label">区域三</span>
</view>
<view class="zd-col-19 filter_select">
<uni-data-select v-model="index3" :localdata="options1"></uni-data-select>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="clearUp">清空</button> <button class="zd-col-5 button-default" @tap="clearUp">清空</button>
<button class="zd-col-8 button-primary" :class="{'button-info': index === ''}" :disabled="disabled" @tap="_handheldLock('1')">锁定</button> <button class="zd-col-8 button-primary" :class="{'button-info': index1 === '' && index2 === '' && index3 === ''}" :disabled="disabled" @tap="_handheldLock('1')">锁定</button>
<button class="zd-col-8 button-primary" :class="{'button-info': index === ''}" :disabled="disabled" @tap="_handheldLock('0')">释放</button> <button class="zd-col-8 button-primary" :class="{'button-info': index1 === '' && index2 === '' && index3 === ''}" :disabled="disabled" @tap="_handheldLock('0')">释放</button>
</view> </view>
</view> </view>
</template> </template>
@@ -24,6 +40,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 {regionList} from '@/utils/mork2.js'
import {regionList, handheldLock} from '@/utils/getData2.js' import {regionList, handheldLock} from '@/utils/getData2.js'
export default { export default {
components: { components: {
@@ -33,8 +50,10 @@
data() { data() {
return { return {
title: '', title: '',
options: [], options1: [],
index: '', index1: '',
index2: '',
index3: '',
disabled: false disabled: false
}; };
}, },
@@ -45,22 +64,20 @@
methods: { methods: {
async _regionList () { async _regionList () {
let res = await regionList() let res = await regionList()
this.options = [...res.content] this.options1 = [...res.content]
this.options.map(el => { this.options1.map(el => {
this.$set(el, 'text', el.label) this.$set(el, 'text', el.label)
}) })
}, },
selectChange (e) {
this.index = e
},
async _handheldLock (type) { async _handheldLock (type) {
this.disabled = true this.disabled = true
if (this.index === '') { if (this.index1 === '' && this.index2 === '' && this.index3 === '') {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await handheldLock(this.index, type) let arr = [this.index1, this.index2, this.index3]
let res = await handheldLock(arr, type)
this.clearUp() this.clearUp()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@@ -71,7 +88,9 @@
} }
}, },
clearUp () { clearUp () {
this.index = '' this.index1 = ''
this.index2 = ''
this.index3 = ''
this.disabled = false this.disabled = false
} }
} }

View File

@@ -13,7 +13,7 @@
/> />
</view> </view>
</view> </view>
<view class="zd-row"> <view class="zd-row border-bottom">
<view class="zd-col-5"> <view class="zd-col-5">
<span class="filter_label">载具号</span> <span class="filter_label">载具号</span>
</view> </view>
@@ -21,11 +21,20 @@
<link-scan ref="scanChild" @getScanlist="getScanlist"/> <link-scan ref="scanChild" @getScanlist="getScanlist"/>
</view> </view>
</view> </view>
<view class="zd-row">
<view class="zd-col-5">
<span class="filter_label">目的地</span>
</view>
<view class="zd-col-19 filter_select">
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
</view>
</view>
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap="clearUp">清空</button> <button class="zd-col-4 button-default button-primary_s" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_handheldCageFrame">送回确认</button> <button class="zd-col-9 button-primary button-primary_s" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_handheldCageFrame">空笼框送回确认</button>
<button class="zd-col-9 button-primary button-primary_s" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldRack">空料架送回确认</button>
</view> </view>
</view> </view>
</template> </template>
@@ -34,7 +43,7 @@
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 LinkScan from '@/components/LinkScan.vue' import LinkScan from '@/components/LinkScan.vue'
import {handheldCageFrame} from '@/utils/getData2.js' import {handheldCageFrame, handheldRack} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -46,6 +55,8 @@
title: '', title: '',
val1: '', val1: '',
val2: '', val2: '',
options: [{ value: '1', text: '货架' }, { value: '2', text: '内部' }, { value: '3', text: '外协' }],
index: '',
disabled: false disabled: false
}; };
}, },
@@ -57,13 +68,30 @@
this.val2 = e.join() this.val2 = e.join()
}, },
async _handheldCageFrame () { async _handheldCageFrame () {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await handheldCageFrame(this.val1, this.val2, this.index)
this.clearUp()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
async _handheldRack () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.val2) { if (!this.val1 || !this.val2) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await handheldCageFrame(this.val1, this.val2) let res = await handheldRack(this.val1, this.val2)
this.clearUp() this.clearUp()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@@ -76,6 +104,7 @@
clearUp () { clearUp () {
this.val1 = '' this.val1 = ''
this.val2 = '' this.val2 = ''
this.index = ''
this.$refs.scanChild.toDel() this.$refs.scanChild.toDel()
this.disabled = false this.disabled = false
} }

View File

@@ -27,12 +27,12 @@
<view class="zd-col-5"> <view class="zd-col-5">
<span class="filter_label">目的地</span> <span class="filter_label">目的地</span>
</view> </view>
<view class="zd-col-19"> <view class="zd-col-19 filter_select">
<input type="text" class="filter_input" v-model="val3"> <uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view> </view>
</view> </view>
</view> </view>
<view class="zd_wrapper grid-wraper"> <view v-show="index === '1'" class="zd_wrapper grid-wraper">
<view class="slide_new"> <view class="slide_new">
<table> <table>
<thead> <thead>
@@ -54,10 +54,21 @@
</table> </table>
</view> </view>
</view> </view>
<view v-show="dataList.length > 0 && dataList[0].order_code.indexOf('OR') !== -1" class="zd_wrapper">
<view class="zd-row">
<view class="zd-col-7">
<span class="filter_label">下一道工序</span>
</view>
<view class="zd-col-17 filter_select">
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
</view>
</view>
</view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap="clearUp">清空</button> <button class="zd-col-5 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button> <button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldTranshipment">物料转运</button>
</view> </view>
</view> </view>
</template> </template>
@@ -65,7 +76,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 {handheldBlanking} from '@/utils/getData2.js' import {regionList, handheldBlanking, handheldTranshipment} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -76,23 +87,39 @@
title: '', title: '',
val1: '', val1: '',
val2: '', val2: '',
val3: '', options: [{ value: '1', text: '货架' }, { value: '2', text: '内部' }, { value: '3', text: '外协' }],
index: '',
options1: [],
index1: '',
disabled: false, disabled: false,
dataList: [{order_code: '', material_code: '', material_qty: 0}] dataList: [{order_code: '', material_code: '', material_qty: 0}]
}; };
}, },
onLoad (options) { onLoad (options) {
this.title = options.title this.title = options.title
this._regionList()
}, },
methods: { methods: {
selectChange (e) {
this.dataList = [{order_code: '', material_code: '', material_qty: 0}]
this.index1 = ''
},
async _regionList () {
let res = await regionList()
this.options1 = [...res.content]
this.options1.map(el => {
this.$set(el, 'text', el.label)
})
},
addRow () { addRow () {
this.dataList.push({order_code: '', material_code: '', material_qty: 0}) this.dataList.push({order_code: '', material_code: '', material_qty: 0})
}, },
clearUp () { clearUp () {
this.val1 = '' this.val1 = ''
this.val2 = '' this.val2 = ''
this.val3 = '' this.index = ''
this.dataList = [{order_code: '', material_code: '', material_qty: 0}] this.dataList = [{order_code: '', material_code: '', material_qty: 0}]
this.index1 = ''
this.disabled = false this.disabled = false
}, },
async _handheldBlanking () { async _handheldBlanking () {
@@ -108,11 +135,28 @@
} }
}) })
try { try {
let res = await handheldBlanking(this.val1, this.val3, this.val2, arr) let res = await handheldBlanking(this.val1, this.index, this.val2, arr, this.index1)
this.clearUp() this.clearUp()
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }
},
async _handheldTranshipment () {
this.disabled = true
if (!this.val1 || !this.val2) {
this.disabled = false
return
}
try {
let res = await handheldTranshipment(this.val1, this.val2)
this.clearUp()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
} }
} }
} }

View File

@@ -107,6 +107,10 @@
try { try {
let res = await updateOrder(this.dataList) let res = await updateOrder(this.dataList)
this.clearUp() this.clearUp()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }

View File

@@ -36,9 +36,9 @@ export const handheldRack = (code, vcode) => request({
data: {device_code: code, vehicle_code: vcode} data: {device_code: code, vehicle_code: vcode}
}) })
// 外协区空笼框送回 // 外协区空笼框送回
export const handheldCageFrame = (code, list) => request({ export const handheldCageFrame = (code, list, rcode) => request({
url:'api/handheld/cageFrame', url:'api/handheld/cageFrame',
data: {device_code: code, vehicle_list: list} data: {device_code: code, vehicle_list: list, region_code: rcode}
}) })
// 物料转运 // 物料转运
export const handheldTranshipment = (code, vcode) => request({ export const handheldTranshipment = (code, vcode) => request({
@@ -60,9 +60,9 @@ export const handheldStorehouse = (code, type) => request({
// url:'api/handheld/getRegionCode', // url:'api/handheld/getRegionCode',
// data: {orderCode: code} // data: {orderCode: code}
// }) // })
export const handheldBlanking = (code, rcode, vcode, material) => request({ export const handheldBlanking = (code, rcode, vcode, material, rcode1) => request({
url:'api/handheld/blanking', url:'api/handheld/blanking',
data: {device_code: code, region_code: rcode, vehicle_code: vcode, material: material} data: {device_code: code, region_code: rcode, vehicle_code: vcode, material: material, region_code1: rcode1}
}) })
// 修改订单工序 // 修改订单工序
export const fabOrders = (code) => request({ export const fabOrders = (code) => request({
@@ -72,4 +72,4 @@ export const fabOrders = (code) => request({
export const updateOrder = (data) => request({ export const updateOrder = (data) => request({
url:'api/handheld/updateOrder', url:'api/handheld/updateOrder',
data: data data: data
}) })