接口
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<span class="filter_label">载具编码</span>
|
<span class="filter_label">载具编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<search-box v-model="code1"/>
|
<search-box v-model="vehicleCode" @handleChange="handleChange"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<span class="filter_label">所属机台</span>
|
<span class="filter_label">所属机台</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-13">
|
<view class="zd-col-13">
|
||||||
<input type="text" class="filter_input">
|
<input type="text" v-model="deviceData.device_code" class="filter_input">
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="toJump('machine-order?title=机台工单维护')">查询</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="toJump('machine-order?title=机台工单维护')">查询</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<span class="filter_label filter_input_disabled">工单</span>
|
<span class="filter_label filter_input_disabled">工单</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" v-model="deviceData.bom_code" class="filter_input filter_input_disabled" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<span class="filter_label">物料编码</span>
|
<span class="filter_label">物料编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<search-box v-model="code2"/>
|
<search-box v-model="materialInfo"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<span class="filter_label">重量</span>
|
<span class="filter_label">重量</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-16">
|
<view class="zd-col-16">
|
||||||
<input type="number" class="filter_input">
|
<input type="number" v-model="qty" class="filter_input">
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -71,13 +71,18 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i">
|
<tr v-for="(e, i) in dataList" :key="i">
|
||||||
<td>{{i+1}}</td>
|
<td>{{i+1}}</td>
|
||||||
<td>{{e.source_form_type}}</td>
|
|
||||||
<td>{{e.source_form_date}}</td>
|
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.pcsn}}</td>
|
<td>{{e.pcsn}}</td>
|
||||||
<td>{{e.assign_qty}}</td>
|
|
||||||
<td>{{e.qty}}</td>
|
<td>{{e.qty}}</td>
|
||||||
|
<td>{{e.produce_time}}</td>
|
||||||
|
<td>{{e.supp_code}}</td>
|
||||||
|
<td>{{e.supp_name}}</td>
|
||||||
|
<td>{{e.material_spec}}</td>
|
||||||
|
<td>{{e.material_model}}</td>
|
||||||
|
<td>{{e.quality_time_day}}</td>
|
||||||
|
<td>{{['待检', '合格', '不合格'][Number(e.quality_type) - 1]}}</td>
|
||||||
|
<td>{{e.bake_num}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -86,7 +91,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-18 button-primary" :class="{'button-info': !code1}" :disabled="disabled">确认组箱</button>
|
<button class="zd-col-18 button-primary" :class="{'button-info': JSON.stringify(deviceData) === '{}' || (!materialInfo && qty) || (materialInfo && !qty)}" :disabled="disabled" @tap="_deliveryBox">确认组箱</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -94,7 +99,8 @@
|
|||||||
<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 {getStructCount, inStorageOrder, getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
|
import {queryGroupInfo} from '@/utils/mork2.js'
|
||||||
|
import {deliveryBox} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -103,11 +109,10 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
code1: '',
|
vehicleCode: '',
|
||||||
code2: '',
|
deviceData: {},
|
||||||
code3: '',
|
materialInfo: '',
|
||||||
options: [],
|
qty: '',
|
||||||
index: '',
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
@@ -115,41 +120,57 @@
|
|||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
|
onShow () {
|
||||||
|
if (this.$store.getters.publicObj !== '') {
|
||||||
|
this.deviceData = this.$store.getters.publicObj
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleChange (e) {
|
||||||
|
if (e) {
|
||||||
|
this._queryGroupInfo(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _queryGroupInfo (e) {
|
||||||
|
try {
|
||||||
|
let res = await queryGroupInfo(e)
|
||||||
|
if (res && res.data.length > 0) {
|
||||||
|
this.dataList = [...res.data]
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
},
|
||||||
toJump (name) {
|
toJump (name) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/General/${name}`
|
url: `/pages/General/${name}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 下拉框*/
|
|
||||||
async _inStorageOrder () {
|
|
||||||
let res = await inStorageOrder()
|
|
||||||
this.options1 = [...res]
|
|
||||||
},
|
|
||||||
handleChange1 (e) {
|
|
||||||
if (e) {
|
|
||||||
this._getBillNoInfo(e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.code1 = ''
|
this.vehicleCode = ''
|
||||||
|
this.deviceData = {}
|
||||||
|
this.materialInfo = ''
|
||||||
|
this.qty = ''
|
||||||
|
this.dataList = []
|
||||||
},
|
},
|
||||||
async _inStorageConfirm () {
|
async _deliveryBox () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.index) {
|
if (JSON.stringify(this.deviceData) === '{}' || (!this.materialInfo && this.qty) || (this.materialInfo && !this.qty)) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await inStorageConfirm()
|
let res = await deliveryBox(this.deviceData.device_code, this.deviceData.bom_id, this.deviceData.bom_code, this.materialInfo, this.qty, this.dataList)
|
||||||
if (res.code === '200') {
|
if (res) {
|
||||||
this.index = ''
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,14 @@
|
|||||||
<nav-bar :title="title"></nav-bar>
|
<nav-bar :title="title"></nav-bar>
|
||||||
<view class="zd_content">
|
<view class="zd_content">
|
||||||
<view class="zd_wrapper">
|
<view class="zd_wrapper">
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6">
|
||||||
|
<span class="filter_label">载具编码</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-18">
|
||||||
|
<search-box v-model="vehicleCode"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
<view class="zd-col-6">
|
<view class="zd-col-6">
|
||||||
<span class="filter_label">起点</span>
|
<span class="filter_label">起点</span>
|
||||||
@@ -32,7 +40,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-18 button-primary" :class="{'button-info': !code1}" :disabled="disabled">生成任务</button>
|
<button class="zd-col-18 button-primary" :class="{'button-info': !code1 || !code2 || !index}" :disabled="disabled" @tap="_createTask">生成任务</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -40,8 +48,8 @@
|
|||||||
<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 {getDate} from '@/utils/utils.js'
|
import {queryVehicleType} from '@/utils/mork2.js'
|
||||||
import {getStructCount, inStorageOrder, getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
|
import {createTask} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -50,46 +58,54 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
|
vehicleCode: null,
|
||||||
code1: '',
|
code1: '',
|
||||||
code2: '',
|
code2: '',
|
||||||
options: [{value: '1', text: '小料箱'}, {value: '2', text: '大料箱或其他'}],
|
options: [],
|
||||||
index: '',
|
index: '',
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
|
this._queryVehicleType()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 下拉框*/
|
/** 下拉框*/
|
||||||
async _inStorageOrder () {
|
async _queryVehicleType () {
|
||||||
let res = await inStorageOrder()
|
try {
|
||||||
this.options1 = [...res]
|
let res = await queryVehicleType()
|
||||||
},
|
if (res && res.data.length > 0) {
|
||||||
handleChange1 (e) {
|
this.options = [...res.data]
|
||||||
if (e) {
|
} else {
|
||||||
this._getBillNoInfo(e)
|
this.options = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
|
this.vehicleCode = null,
|
||||||
this.code1 = ''
|
this.code1 = ''
|
||||||
|
this.code2 = ''
|
||||||
|
this.index = ''
|
||||||
|
this.disabled = false
|
||||||
},
|
},
|
||||||
async _inStorageConfirm () {
|
async _createTask () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.index) {
|
if (!this.code1 || !this.code2 || !this.index) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await inStorageConfirm()
|
let res = await createTask(this.vehicleCode, this.code1, this.code2, this.index)
|
||||||
if (res.code === '200') {
|
if (res) {
|
||||||
this.index = ''
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<view class="zd-col-14">
|
<view class="zd-col-14">
|
||||||
<input type="text" placeholder="输入物料关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
|
<input type="text" placeholder="输入物料关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="searchList">查询</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="_queryBomInfo">查询</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
@@ -29,28 +29,31 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>物料编码</th>
|
<th>机台编码</th>
|
||||||
|
<th>机台名称</th>
|
||||||
|
<th>工单号</th>
|
||||||
|
<th>生产物料</th>
|
||||||
<th>物料名称</th>
|
<th>物料名称</th>
|
||||||
<th>物料规格</th>
|
<th>数量</th>
|
||||||
<th>型号</th>
|
<th>计量单位</th>
|
||||||
<th>有效期(天)</th>
|
<th>生产日期</th>
|
||||||
<th>执行标准</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_id === pkId}" @tap="toCheck(e)">
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.bom_id === pkId}" @tap="toCheck(e)">
|
||||||
|
<td>{{e.device_code}}</td>
|
||||||
|
<td>{{e.device_name}}</td>
|
||||||
|
<td>{{e.bom_code}}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.material_name}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.call_qty}}</td>
|
||||||
<td>{{e.unit_id}}</td>
|
<td>{{e.qty_unit_name}}</td>
|
||||||
<td>{{e.single_weight}}</td>
|
<td>{{e.start_time}}</td>
|
||||||
<td>{{e.pcsn}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<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-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
<button class="zd-col-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||||
@@ -62,7 +65,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 {getDate} from '@/utils/utils.js'
|
import {getDate} from '@/utils/utils.js'
|
||||||
import {groupMaterList} from '@/utils/getData2.js'
|
import {queryBomInfo} from '@/utils/mork2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -78,17 +81,7 @@
|
|||||||
date: currentDate,
|
date: currentDate,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {}
|
||||||
reload: false,
|
|
||||||
status: 'more',
|
|
||||||
contentText: {
|
|
||||||
contentdown: '查看更多',
|
|
||||||
contentrefresh: '加载中',
|
|
||||||
contentnomore: '没有更多'
|
|
||||||
},
|
|
||||||
totalCount: 0,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -101,6 +94,7 @@
|
|||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
|
this._queryBomInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleFocus () {
|
handleFocus () {
|
||||||
@@ -109,42 +103,21 @@
|
|||||||
bindDateChange: function(e) {
|
bindDateChange: function(e) {
|
||||||
this.date = e.detail.value
|
this.date = e.detail.value
|
||||||
},
|
},
|
||||||
searchList () {
|
async _queryBomInfo () {
|
||||||
this.dataList = []
|
try {
|
||||||
this.pageNum = 1
|
let res = await queryBomInfo(this.date, this.keyword)
|
||||||
this._groupMaterList()
|
if (res && res.data.length > 0) {
|
||||||
},
|
this.dataList = [...res.data]
|
||||||
async _groupMaterList () {
|
|
||||||
let res = await groupMaterList(this.pageNum + '', this.pageSize + '', this.val1)
|
|
||||||
if (res.code === '200') {
|
|
||||||
this.totalCount = res.totalElements
|
|
||||||
if (res.totalElements > 0) {
|
|
||||||
const dataMap = res.content
|
|
||||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
|
||||||
this.reload = false
|
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
if (this.totalCount == this.dataList.length) {
|
} catch (e) {
|
||||||
this.reload = false
|
this.dataList = []
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onReachBottom () {
|
|
||||||
if (this.totalCount > this.dataList.length) {
|
|
||||||
this.status = 'loading'
|
|
||||||
setTimeout(() => {
|
|
||||||
this.pageNum++
|
|
||||||
this._groupMaterList()
|
|
||||||
}, 1000)
|
|
||||||
} else { //停止加载
|
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
this.pkId = this.pkId === e.bom_id ? '' : e.bom_id
|
||||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
this.pkObj = this.pkId === e.bom_id ? e : {}
|
||||||
},
|
},
|
||||||
toSure () {
|
toSure () {
|
||||||
if (this.pkId) {
|
if (this.pkId) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<view class="zd-col-14">
|
<view class="zd-col-14">
|
||||||
<input type="text" placeholder="输入物料关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
|
<input type="text" placeholder="输入物料关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="searchList">查询</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="_queryMaterial">查询</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
@@ -32,15 +32,14 @@
|
|||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.material_name}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.material_spec}}</td>
|
||||||
<td>{{e.unit_id}}</td>
|
<td>{{e.material_model}}</td>
|
||||||
<td>{{e.single_weight}}</td>
|
<td>{{e.quality_time}}</td>
|
||||||
<td>{{e.pcsn}}</td>
|
<td>{{e.execution_stand}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<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-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
<button class="zd-col-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||||
@@ -51,7 +50,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 {groupMaterList} from '@/utils/getData2.js'
|
import {queryMaterial} from '@/utils/mork2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -63,57 +62,27 @@
|
|||||||
keyword: null,
|
keyword: null,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {}
|
||||||
reload: false,
|
|
||||||
status: 'more',
|
|
||||||
contentText: {
|
|
||||||
contentdown: '查看更多',
|
|
||||||
contentrefresh: '加载中',
|
|
||||||
contentnomore: '没有更多'
|
|
||||||
},
|
|
||||||
totalCount: 0,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
|
this._queryMaterial()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleFocus () {
|
handleFocus () {
|
||||||
this.keyword = null
|
this.keyword = null
|
||||||
},
|
},
|
||||||
searchList () {
|
async _queryMaterial () {
|
||||||
this.dataList = []
|
try {
|
||||||
this.pageNum = 1
|
let res = await queryMaterial(this.keyword)
|
||||||
this._groupMaterList()
|
if (res && res.data.length > 0) {
|
||||||
},
|
this.dataList = [...res.data]
|
||||||
async _groupMaterList () {
|
|
||||||
let res = await groupMaterList(this.pageNum + '', this.pageSize + '', this.val1)
|
|
||||||
if (res.code === '200') {
|
|
||||||
this.totalCount = res.totalElements
|
|
||||||
if (res.totalElements > 0) {
|
|
||||||
const dataMap = res.content
|
|
||||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
|
||||||
this.reload = false
|
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
if (this.totalCount == this.dataList.length) {
|
} catch (e) {
|
||||||
this.reload = false
|
this.dataList = []
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onReachBottom () {
|
|
||||||
if (this.totalCount > this.dataList.length) {
|
|
||||||
this.status = 'loading'
|
|
||||||
setTimeout(() => {
|
|
||||||
this.pageNum++
|
|
||||||
this._groupMaterList()
|
|
||||||
}, 1000)
|
|
||||||
} else { //停止加载
|
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<span class="filter_label">点位/载具</span>
|
<span class="filter_label">点位/载具</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<search-box v-model="code1"/>
|
<search-box v-model="keyword" @handleChange="handleChange"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<span class="filter_label filter_input_disabled">当前站点</span>
|
<span class="filter_label filter_input_disabled">当前站点</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" v-model="currentData.point_cdoe" class="filter_input filter_input_disabled" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -25,13 +25,13 @@
|
|||||||
<span class="filter_label filter_input_disabled">任务号</span>
|
<span class="filter_label filter_input_disabled">任务号</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-8">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" v-model="currentData.task_code" class="filter_input filter_input_disabled" disabled>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-4">
|
<view class="zd-col-4">
|
||||||
<span class="filter_label filter_input_disabled">AGV</span>
|
<span class="filter_label filter_input_disabled">AGV</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-8">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" v-model="currentData.car_no" class="filter_input filter_input_disabled" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -39,13 +39,13 @@
|
|||||||
<span class="filter_label filter_input_disabled">起点</span>
|
<span class="filter_label filter_input_disabled">起点</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-8">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" v-model="currentData.point_cdoe1" class="filter_input filter_input_disabled" disabled>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-4">
|
<view class="zd-col-4">
|
||||||
<span class="filter_label filter_input_disabled">终点</span>
|
<span class="filter_label filter_input_disabled">终点</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-8">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" v-model="currentData.point_cdoe2" class="filter_input filter_input_disabled" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -88,8 +88,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">确认取货</button>
|
<button class="zd-col-9 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_confirmGet">确认取货</button>
|
||||||
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">确认放货</button>
|
<button class="zd-col-9 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_confirmPut">确认放货</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -97,7 +97,8 @@
|
|||||||
<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 {getStructCount, inStorageOrder, getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
|
import {queryPointInfo} from '@/utils/mork2.js'
|
||||||
|
import {confirmGet, confirmPut} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -106,11 +107,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
code1: '',
|
keyword: '',
|
||||||
code2: '',
|
currentData: {},
|
||||||
code3: '',
|
|
||||||
options: [],
|
|
||||||
index: '',
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
@@ -119,40 +117,66 @@
|
|||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toJump (name) {
|
handleChange (e) {
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/General/${name}`
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 下拉框*/
|
|
||||||
async _inStorageOrder () {
|
|
||||||
let res = await inStorageOrder()
|
|
||||||
this.options1 = [...res]
|
|
||||||
},
|
|
||||||
handleChange1 (e) {
|
|
||||||
if (e) {
|
if (e) {
|
||||||
this._getBillNoInfo(e)
|
this._queryPointInfo(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _queryPointInfo (e) {
|
||||||
|
try {
|
||||||
|
let res = await queryPointInfo(e)
|
||||||
|
if (res && res.data) {
|
||||||
|
this.currentData = res.data
|
||||||
|
this.dataList = [...res.data.rows]
|
||||||
|
} else {
|
||||||
|
this.currentData = {}
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.currentData = {}
|
||||||
|
this.dataList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.code1 = ''
|
this.keyword = ''
|
||||||
|
this.currentData = {}
|
||||||
|
this.dataList = []
|
||||||
|
this.disabled = false
|
||||||
},
|
},
|
||||||
async _inStorageConfirm () {
|
async _confirmGet () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.index) {
|
if (JSON.stringify(this.currentData) === '{}') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await inStorageConfirm()
|
let res = await confirmGet(this.currentData.point_code)
|
||||||
if (res.code === '200') {
|
if (res) {
|
||||||
this.index = ''
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
}
|
||||||
title: res.msg,
|
},
|
||||||
icon: 'none'
|
async _confirmPut () {
|
||||||
})
|
this.disabled = true
|
||||||
|
if (JSON.stringify(this.currentData) === '{}') {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await confirmPut(this.currentData.point_code)
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.toEmpty()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<span class="filter_label">点位</span>
|
<span class="filter_label">点位</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<search-box v-model="code1"/>
|
<search-box v-model="pointCode"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
<span class="filter_label">载具编码</span>
|
<span class="filter_label">载具编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-13">
|
<view class="zd-col-13">
|
||||||
<search-box v-model="code2"/>
|
<search-box v-model="vehicleCode"/>
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini">查询</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="_updatePointqueryPointInfo">查询</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
@@ -36,25 +36,24 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_id === pkId}" @tap="toCheck(e)">
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_code === pkId}">
|
||||||
|
<td>{{i+1}}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.material_name}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
|
||||||
<td>{{e.unit_id}}</td>
|
|
||||||
<td>{{e.single_weight}}</td>
|
|
||||||
<td>{{e.pcsn}}</td>
|
<td>{{e.pcsn}}</td>
|
||||||
|
<td>{{e.qty}}</td>
|
||||||
|
<td>{{e.qty_unit_name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<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-5 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" @tap="toSure">绑定</button>
|
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_bindVehicle">绑定</button>
|
||||||
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" @tap="toSure">清载具</button>
|
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_clearVehicle">清载具</button>
|
||||||
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" @tap="toSure">清物料</button>
|
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_clearMaterial">清物料</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -62,95 +61,84 @@
|
|||||||
<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 {getDate} from '@/utils/utils.js'
|
import {updatePointqueryPointInfo} from '@/utils/mork2.js'
|
||||||
import {groupMaterList} from '@/utils/getData2.js'
|
import {bindVehicle, clearVehicle, clearMaterial} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox
|
SearchBox
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const currentDate = getDate({
|
|
||||||
format: true
|
|
||||||
})
|
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
keyword: null,
|
pointCode: '',
|
||||||
date: currentDate,
|
vehicleCode: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
disabled: false
|
||||||
pkObj: {},
|
|
||||||
reload: false,
|
|
||||||
status: 'more',
|
|
||||||
contentText: {
|
|
||||||
contentdown: '查看更多',
|
|
||||||
contentrefresh: '加载中',
|
|
||||||
contentnomore: '没有更多'
|
|
||||||
},
|
|
||||||
totalCount: 0,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
startDate() {
|
|
||||||
return getDate('start');
|
|
||||||
},
|
|
||||||
endDate() {
|
|
||||||
return getDate('end');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleFocus () {
|
async _updatePointqueryPointInfo () {
|
||||||
this.keyword = null
|
try {
|
||||||
},
|
let res = await updatePointqueryPointInfo(this.pointCode, this.vehicleCode)
|
||||||
bindDateChange: function(e) {
|
if (res && res.data.length > 0) {
|
||||||
this.date = e.detail.value
|
this.dataList = [...res.data]
|
||||||
},
|
|
||||||
searchList () {
|
|
||||||
this.dataList = []
|
|
||||||
this.pageNum = 1
|
|
||||||
this._groupMaterList()
|
|
||||||
},
|
|
||||||
async _groupMaterList () {
|
|
||||||
let res = await groupMaterList(this.pageNum + '', this.pageSize + '', this.val1)
|
|
||||||
if (res.code === '200') {
|
|
||||||
this.totalCount = res.totalElements
|
|
||||||
if (res.totalElements > 0) {
|
|
||||||
const dataMap = res.content
|
|
||||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
|
||||||
this.reload = false
|
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
if (this.totalCount == this.dataList.length) {
|
} catch (e) {
|
||||||
this.reload = false
|
this.dataList = []
|
||||||
this.status = 'noMore'
|
}
|
||||||
|
},
|
||||||
|
toEmpty () {
|
||||||
|
this.pointCode = ''
|
||||||
|
this.vehicleCode = ''
|
||||||
|
this.dataList = []
|
||||||
|
this.disabled = false
|
||||||
|
},
|
||||||
|
async _bindVehicle () {
|
||||||
|
try {
|
||||||
|
let res = await bindVehicle(this.pointCode, this.vehicleCode)
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom () {
|
async _clearVehicle () {
|
||||||
if (this.totalCount > this.dataList.length) {
|
try {
|
||||||
this.status = 'loading'
|
let res = await clearVehicle(this.pointCode, this.vehicleCode)
|
||||||
setTimeout(() => {
|
if (res) {
|
||||||
this.pageNum++
|
uni.showToast({
|
||||||
this._groupMaterList()
|
title: res.message,
|
||||||
}, 1000)
|
icon: 'none'
|
||||||
} else { //停止加载
|
})
|
||||||
this.status = 'noMore'
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toCheck (e) {
|
async _clearMaterial () {
|
||||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
try {
|
||||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
let res = await clearMaterial(this.pointCode, this.vehicleCode)
|
||||||
},
|
if (res) {
|
||||||
toSure () {
|
uni.showToast({
|
||||||
if (this.pkId) {
|
title: res.message,
|
||||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
icon: 'none'
|
||||||
uni.navigateBack()
|
})
|
||||||
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<view class="zd-col-14">
|
<view class="zd-col-14">
|
||||||
<input type="text" placeholder="输入供应商关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
|
<input type="text" placeholder="输入供应商关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="searchList">查询</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="_querySupp">查询</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
@@ -25,16 +25,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_id === pkId}" @tap="toCheck(e)">
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.supp_id === pkId}" @tap="toCheck(e)">
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.supp_code}}</td>
|
||||||
<td>{{e.material_name}}</td>
|
<td>{{e.supp_name}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.remark}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<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-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
<button class="zd-col-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||||
@@ -45,7 +44,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 {groupMaterList} from '@/utils/getData2.js'
|
import {querySupp} from '@/utils/mork2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -57,66 +56,36 @@
|
|||||||
keyword: null,
|
keyword: null,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {}
|
||||||
reload: false,
|
|
||||||
status: 'more',
|
|
||||||
contentText: {
|
|
||||||
contentdown: '查看更多',
|
|
||||||
contentrefresh: '加载中',
|
|
||||||
contentnomore: '没有更多'
|
|
||||||
},
|
|
||||||
totalCount: 0,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
|
this._querySupp()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleFocus () {
|
handleFocus () {
|
||||||
this.keyword = null
|
this.keyword = null
|
||||||
},
|
},
|
||||||
searchList () {
|
async _querySupp () {
|
||||||
this.dataList = []
|
try {
|
||||||
this.pageNum = 1
|
let res = await querySupp(this.keyword)
|
||||||
this._groupMaterList()
|
if (res && res.data.length > 0) {
|
||||||
},
|
this.dataList = [...res.data]
|
||||||
async _groupMaterList () {
|
|
||||||
let res = await groupMaterList(this.pageNum + '', this.pageSize + '', this.val1)
|
|
||||||
if (res.code === '200') {
|
|
||||||
this.totalCount = res.totalElements
|
|
||||||
if (res.totalElements > 0) {
|
|
||||||
const dataMap = res.content
|
|
||||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
|
||||||
this.reload = false
|
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
if (this.totalCount == this.dataList.length) {
|
} catch (e) {
|
||||||
this.reload = false
|
this.dataList = []
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onReachBottom () {
|
|
||||||
if (this.totalCount > this.dataList.length) {
|
|
||||||
this.status = 'loading'
|
|
||||||
setTimeout(() => {
|
|
||||||
this.pageNum++
|
|
||||||
this._groupMaterList()
|
|
||||||
}, 1000)
|
|
||||||
} else { //停止加载
|
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
this.pkId = this.pkId === e.supp_id ? '' : e.supp_id
|
||||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
this.pkObj = this.pkId === e.supp_id ? e : {}
|
||||||
},
|
},
|
||||||
toSure () {
|
toSure () {
|
||||||
if (this.pkId) {
|
if (this.pkId) {
|
||||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
this.$store.dispatch('setFormData', this.pkObj)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<span class="filter_label">载具编码</span>
|
<span class="filter_label">载具编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<search-box v-model="code1"/>
|
<search-box v-model="vehicleCode"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<span class="filter_label">物料编码</span>
|
<span class="filter_label">物料编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-13">
|
<view class="zd-col-13">
|
||||||
<search-box v-model="code2"/>
|
<search-box v-model="materialData.material_code"/>
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="toJump('material?title=物料维护')">查询</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="toJump('material?title=物料维护')">查询</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<span class="filter_label filter_input_disabled">物料名称</span>
|
<span class="filter_label filter_input_disabled">物料名称</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_name" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<span class="filter_label">供应商编码</span>
|
<span class="filter_label">供应商编码</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-13">
|
<view class="zd-col-13">
|
||||||
<search-box v-model="code3"/>
|
<search-box v-model="suppData.supp_code"/>
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="toJump('supplier?title=供应商维护')">查询</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="toJump('supplier?title=供应商维护')">查询</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<span class="filter_label filter_input_disabled">供应商名称</span>
|
<span class="filter_label filter_input_disabled">供应商名称</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<input type="text" class="filter_input filter_input_disabled" disabled>
|
<input type="text" v-model="suppData.supp_name" class="filter_input filter_input_disabled" disabled>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<span class="filter_label">批次</span>
|
<span class="filter_label">批次</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<input type="text" class="filter_input">
|
<input type="text" v-model="pcsn" class="filter_input">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<span class="filter_label">重量</span>
|
<span class="filter_label">重量</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-16">
|
<view class="zd-col-16">
|
||||||
<input type="number" class="filter_input">
|
<input type="number" v-model="qty" class="filter_input">
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -78,7 +78,15 @@
|
|||||||
<span class="filter_label">品质类型</span>
|
<span class="filter_label">品质类型</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18 filter_select">
|
<view class="zd-col-18 filter_select">
|
||||||
<uni-data-select v-model="index" :localdata="options"></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-6">
|
||||||
|
<span class="filter_label">料箱类型</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-18 filter_select">
|
||||||
|
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -86,42 +94,48 @@
|
|||||||
<span class="filter_label">烘干次数</span>
|
<span class="filter_label">烘干次数</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<input type="number" class="filter_input">
|
<input type="number" v-model="num" class="filter_input">
|
||||||
</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="toEmpty">清空</button>
|
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">确认组箱</button>
|
<button class="zd-col-9 button-primary" :class="{'button-info': !vehicleCode || JSON.stringify(materialData) === '{}' || JSON.stringify(suppData) === '{}'}" :disabled="disabled" @tap="_confirmBox">确认组箱</button>
|
||||||
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">标签打印</button>
|
<button class="zd-col-9 button-primary" :class="{'button-info': !vehicleCode || JSON.stringify(materialData) === '{}' || JSON.stringify(suppData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {getCLodop} from '@/utils/CLodopfuncs.js'
|
||||||
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 {getDate} from '@/utils/utils.js'
|
import {getDate} from '@/utils/utils.js'
|
||||||
import {getStructCount, inStorageOrder, getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
|
const currentDate = getDate({format: true})
|
||||||
|
import {queryGroupQuality, queryBoxType} from '@/utils/mork2.js'
|
||||||
|
import {confirmBox} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox
|
SearchBox
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const currentDate = getDate({
|
|
||||||
format: true
|
|
||||||
})
|
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
code1: '',
|
vehicleCode: '',
|
||||||
code2: '',
|
|
||||||
code3: '',
|
|
||||||
date: currentDate,
|
date: currentDate,
|
||||||
options: [],
|
options1: [],
|
||||||
index: '',
|
index1: '',
|
||||||
disabled: false
|
options2: [],
|
||||||
|
index2: '',
|
||||||
|
materialData: {},
|
||||||
|
suppData: {},
|
||||||
|
pcsn: null,
|
||||||
|
qty: null,
|
||||||
|
num: 0,
|
||||||
|
disabled: false,
|
||||||
|
disabled1: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -134,6 +148,18 @@
|
|||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
|
this._queryGroupQuality()
|
||||||
|
this._queryBoxType()
|
||||||
|
},
|
||||||
|
onShow () {
|
||||||
|
if (this.$store.getters.publicObj !== '') {
|
||||||
|
this.materialData = this.$store.getters.publicObj
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
}
|
||||||
|
if (this.$store.getters.formData !== '') {
|
||||||
|
this.suppData = this.$store.getters.formData
|
||||||
|
this.$store.dispatch('setFormData', '')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toJump (name) {
|
toJump (name) {
|
||||||
@@ -145,37 +171,107 @@
|
|||||||
this.date = e.detail.value
|
this.date = e.detail.value
|
||||||
},
|
},
|
||||||
/** 下拉框*/
|
/** 下拉框*/
|
||||||
async _inStorageOrder () {
|
async _queryGroupQuality () {
|
||||||
let res = await inStorageOrder()
|
try {
|
||||||
this.options1 = [...res]
|
let res = await queryGroupQuality()
|
||||||
|
if (res && res.data) {
|
||||||
|
this.options1 = [...res.data]
|
||||||
|
} else {
|
||||||
|
this.options1 = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options1 = []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleChange1 (e) {
|
async _queryBoxType () {
|
||||||
if (e) {
|
try {
|
||||||
this._getBillNoInfo(e)
|
let res = await queryBoxType()
|
||||||
|
if (res && res.data) {
|
||||||
|
this.options2 = [...res.data]
|
||||||
|
} else {
|
||||||
|
this.options2 = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options2 = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.code1 = ''
|
this.vehicleCode = ''
|
||||||
|
this.date = currentDate
|
||||||
|
this.index1 = ''
|
||||||
|
this.index2 = ''
|
||||||
|
this.materialData = {}
|
||||||
|
this.suppData = {}
|
||||||
|
this.pcsn = null
|
||||||
|
this.qty = null
|
||||||
|
this.num = 0
|
||||||
},
|
},
|
||||||
async _inStorageConfirm () {
|
async _confirmBox () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.index) {
|
if (!this.vehicleCode || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await inStorageConfirm()
|
let res = await confirmBox(this.vehicleCode, this.materialData.material_id, this.materialData.material_code, this.materialData.material_name, this.suppData.supp_code, this.suppData.supp_name, this.pcsn, this.date, this.qty, this.index1, this.index2, this.num)
|
||||||
if (res.code === '200') {
|
if (res) {
|
||||||
this.index = ''
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
labelPrint () {
|
||||||
|
this.disabled = true
|
||||||
|
let data = Object.assign({}, this.materialData, this.suppData, {pcsn: this.pcsn, produce_time: this.date, bake_num: this.num})
|
||||||
|
this.toPrint(data)
|
||||||
|
},
|
||||||
|
toPrint (data) {
|
||||||
|
let iparr = this.$store.getters.printUrl.split(":")
|
||||||
|
let printUrl = iparr[1].slice(2)
|
||||||
|
let LODOP = getCLodop();
|
||||||
|
if (!(LODOP.webskt && LODOP.webskt.readyState === 1)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '当前配置ip:' + printUrl + '网络不通,请检查',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 5000
|
||||||
|
})
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||||
|
LODOP.SET_LICENSES('浙江省烟草专卖局(公司)', 'C0C4A46A3A0D1F526D426018D9F11921', '', '')
|
||||||
|
// 更换为打印服务器ip 不需要加前缀
|
||||||
|
LODOP.PRINT_INIT(null, printUrl);
|
||||||
|
// 打印机序号 规则为打印服务器打印机列表倒数从0开始 -1为默认打印机
|
||||||
|
LODOP.SET_PRINTER_INDEX(-1);
|
||||||
|
// 设置打印纸大小
|
||||||
|
LODOP.SET_PRINT_PAGESIZE(1, '130mm', '67mm', '');
|
||||||
|
LODOP.ADD_PRINT_RECT('1mm', '3mm', '124mm', '61mm', 0, 1);
|
||||||
|
LODOP.SET_PRINT_STYLE('FontSize', 12);
|
||||||
|
LODOP.SET_PRINT_STYLE('Bold', 1);
|
||||||
|
LODOP.ADD_PRINT_BARCODE('2mm', '4mm', '33mm', '33mm', 'QRCode', data.material_code + '##' + data.supp_code);
|
||||||
|
LODOP.ADD_PRINT_TEXT('5mm', '35mm', '80mm', '15mm', '物料编码:' + data.material_code);
|
||||||
|
LODOP.ADD_PRINT_TEXT('12mm', '35mm', '80mm', '15mm', '物料名称:' + data.material_name);
|
||||||
|
LODOP.ADD_PRINT_TEXT('19mm', '35mm', '80mm', '15mm', ' 规格:' + data.material_spec);
|
||||||
|
LODOP.ADD_PRINT_TEXT('26mm', '35mm', '80mm', '15mm', ' 型号:' + data.material_model);
|
||||||
|
LODOP.ADD_PRINT_TEXT('34mm', '5mm', '80mm', '15mm', ' 执行标准:' + data.execution_stand)
|
||||||
|
LODOP.ADD_PRINT_TEXT('34mm', '59mm', '80mm', '15mm', '有效期(天):' + data.quality_time)
|
||||||
|
LODOP.ADD_PRINT_TEXT('41mm', '5mm', '80mm', '15mm', ' 批次:' + data.pcsn)
|
||||||
|
LODOP.ADD_PRINT_TEXT('41mm', '59mm', '80mm', '15mm', ' 生产日期:' + data.produce_time)
|
||||||
|
LODOP.ADD_PRINT_TEXT('48mm', '5mm', '80mm', '15mm', '供应商编码:' + data.supp_code)
|
||||||
|
LODOP.ADD_PRINT_TEXT('48mm', '59mm', '80mm', '15mm', '供应商名称:' + data.supp_name)
|
||||||
|
LODOP.ADD_PRINT_TEXT('55mm', '5mm', '80mm', '15mm', ' 烘干次数:' + data.bake_num)
|
||||||
|
// LODOP.PRINT();
|
||||||
|
LODOP.PREVIEW()
|
||||||
|
uni.showToast({
|
||||||
|
title: '打印成功',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,136 @@ export const handLogin = (user, password) => request({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 查询品质类型
|
||||||
|
export const queryGroupQuality = () => request({
|
||||||
|
url:'api/pdaGeneralPublic/queryGroupQuality',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 查询物料
|
||||||
|
export const queryMaterial = (code) => request({
|
||||||
|
url:'api/pdaGeneralPublic/queryMaterial',
|
||||||
|
data: {material_code: code}
|
||||||
|
})
|
||||||
|
// 查询供应商
|
||||||
|
export const querySupp = (code) => request({
|
||||||
|
url:'api/pdaGeneralPublic/querySupp',
|
||||||
|
data: {supp_code: code}
|
||||||
|
})
|
||||||
|
// 查询料箱类型
|
||||||
|
export const queryBoxType = (code) => request({
|
||||||
|
url:'api/pdaGeneralPublic/queryBoxType',
|
||||||
|
data: {supp_code: code}
|
||||||
|
})
|
||||||
|
// 查询组盘信息
|
||||||
|
export const queryGroupInfo = (code) => request({
|
||||||
|
url:'api/pdaGeneralPublic/queryGroupInfo',
|
||||||
|
data: {storagevehicle_code: code}
|
||||||
|
})
|
||||||
|
// 查询工单信息
|
||||||
|
export const queryBomInfo = (time, search) => request({
|
||||||
|
url:'api/pdaGeneralPublic/queryBomInfo',
|
||||||
|
data: {start_time: time, search: search}
|
||||||
|
})
|
||||||
|
// 查询载具类型
|
||||||
|
export const queryVehicleType = (time, search) => request({
|
||||||
|
url:'api/pdaGeneralPublic/queryVehicleType',
|
||||||
|
data: {start_time: time, search: search}
|
||||||
|
})
|
||||||
|
// 确认组箱(入库组箱)
|
||||||
|
export const confirmBox = (scode, id, mcode, mname, spcode, spname, pcsn, time, qty, quality, type, num) => request({
|
||||||
|
url:'api/pdaInGroupBox/confirmBox',
|
||||||
|
data: {
|
||||||
|
storagevehicle_code:scode,
|
||||||
|
material_id:id,
|
||||||
|
material_code:mcode,
|
||||||
|
material_name:mname,
|
||||||
|
supp_code:spcode,
|
||||||
|
supp_name:spname,
|
||||||
|
pcsn:pcsn,
|
||||||
|
produce_time:time,
|
||||||
|
qty:qty,
|
||||||
|
quality_type: quality,
|
||||||
|
box_type: type,
|
||||||
|
bake_num: num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 确认组箱(组箱配送)
|
||||||
|
export const deliveryBox = (code, id, bcode, info, qty, rows) => request({
|
||||||
|
url:'api/pdaInGroupBox/deliveryBox',
|
||||||
|
data: {
|
||||||
|
device_code: code,
|
||||||
|
bom_id: id,
|
||||||
|
bom_code: bcode,
|
||||||
|
material_info: info,
|
||||||
|
qty: qty,
|
||||||
|
rows: rows
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 生成任务(点对点任务)
|
||||||
|
export const createTask = (code, code1, code2, type) => request({
|
||||||
|
url:'api/pdaPointAndPoint/createTask',
|
||||||
|
data: {
|
||||||
|
storagevehicle_code: code,
|
||||||
|
point_code1: code1,
|
||||||
|
point_code2: code2,
|
||||||
|
task_type: type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 查询明细以及任务信息(确认取放货)
|
||||||
|
export const queryPointInfo = (search) => request({
|
||||||
|
url:'api/pdaPickUp/queryPointInfo',
|
||||||
|
data: {
|
||||||
|
search: search
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 确认取货
|
||||||
|
export const confirmGet = (code) => request({
|
||||||
|
url:'api/pdaPickUp/confirmGet',
|
||||||
|
data: {
|
||||||
|
point_code: code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 确认放货
|
||||||
|
export const confirmPut = (code) => request({
|
||||||
|
url:'api/pdaPickUp/confirmPut',
|
||||||
|
data: {
|
||||||
|
point_code: code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 查询点位物料信息(点位更新)
|
||||||
|
export const updatePointqueryPointInfo = (code, scode) => request({
|
||||||
|
url:'api/pdaUpdatePoint/queryPointInfo',
|
||||||
|
data: {
|
||||||
|
point_code: code,
|
||||||
|
storagevehicle_code: scode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 绑定
|
||||||
|
export const bindVehicle = (code, scode) => request({
|
||||||
|
url:'api/pdaUpdatePoint/bindVehicle',
|
||||||
|
data: {
|
||||||
|
point_code: code,
|
||||||
|
storagevehicle_code: scode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 清载具
|
||||||
|
export const clearVehicle = (code, scode) => request({
|
||||||
|
url:'api/pdaUpdatePoint/clearVehicle',
|
||||||
|
data: {
|
||||||
|
point_code: code,
|
||||||
|
storagevehicle_code: scode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 清物料
|
||||||
|
export const clearMaterial = (code, scode) => request({
|
||||||
|
url:'api/pdaUpdatePoint/clearMaterial',
|
||||||
|
data: {
|
||||||
|
point_code: code,
|
||||||
|
storagevehicle_code: scode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料组盘入库
|
* 物料组盘入库
|
||||||
*/
|
*/
|
||||||
|
|||||||
452
utils/mork2.js
452
utils/mork2.js
@@ -1,399 +1,123 @@
|
|||||||
export const FormTypes = (code) => {
|
export const queryGroupQuality = (code) => {
|
||||||
let res = [
|
|
||||||
{
|
|
||||||
lable: '收料通知单明细',
|
|
||||||
id: '1778673956455321600',
|
|
||||||
value: 'MRN_DTL'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lable: '收料通知单',
|
|
||||||
id: '1778676876466851840',
|
|
||||||
value: 'MRN_MST'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lable: '出入库单主表',
|
|
||||||
id: '1780517070820216832',
|
|
||||||
value: 'st_ivt_iostorinv'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const pmFormData = (code) => {
|
|
||||||
let res = {
|
let res = {
|
||||||
totalElements: '2',
|
message: 'ok',
|
||||||
content: [
|
data: [
|
||||||
{
|
{
|
||||||
id: '1813491860891635712',
|
text: '品质1',
|
||||||
code: 'MV20240717001',
|
value: '1'
|
||||||
proc_inst_id: '1813491872891539456',
|
|
||||||
source_form_id: '',
|
|
||||||
source_form_type: '',
|
|
||||||
source_form_date: '',
|
|
||||||
form_type: 'st_ivt_move',
|
|
||||||
status: '80',
|
|
||||||
remark: '',
|
|
||||||
create_time: '2024-07-17 16:32:07',
|
|
||||||
create_name: '管理员',
|
|
||||||
material_id: null,
|
|
||||||
material_name: null,
|
|
||||||
material_code: '100',
|
|
||||||
material_spec: null,
|
|
||||||
single_weight: null,
|
|
||||||
qty: '0.000',
|
|
||||||
assign_qty: '0.000',
|
|
||||||
unit_id: null,
|
|
||||||
pcsn: null,
|
|
||||||
vehicle_code: null,
|
|
||||||
vehicle_id: null,
|
|
||||||
form_data: {
|
|
||||||
stor_code: 'FStockPallet'
|
|
||||||
},
|
|
||||||
parent_id: null,
|
|
||||||
hasChildren: true
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
data: null,
|
|
||||||
code: '200',
|
|
||||||
msg: '查询成功'
|
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
export const queryBoxType = (code) => {
|
||||||
export const groupMaterList = () => {
|
|
||||||
let res = {
|
let res = {
|
||||||
totalElements: '2',
|
message: 'ok',
|
||||||
content: [
|
data: [
|
||||||
|
{
|
||||||
|
text: '类型1',
|
||||||
|
value: '1'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
export const queryVehicleType = (code) => {
|
||||||
|
let res = {
|
||||||
|
message: 'ok',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
text: '小料箱',
|
||||||
|
value: '1'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
export const queryMaterial = (code) => {
|
||||||
|
let res = {
|
||||||
|
message: 'ok',
|
||||||
|
data: [
|
||||||
{
|
{
|
||||||
material_id: '1',
|
material_id: '1',
|
||||||
material_name: null,
|
material_code: 'mater1',
|
||||||
material_code: '100',
|
material_name: 'material_name',
|
||||||
material_spec: null,
|
material_spec: 'material_spec',
|
||||||
single_weight: null,
|
material_model: 'material_model',
|
||||||
qty: '0.000',
|
execution_stand: 'execution_stand',
|
||||||
assign_qty: '0.000',
|
quality_time: 'quality_time'
|
||||||
unit_id: null,
|
|
||||||
pcsn: null,
|
|
||||||
vehicle_code: '100',
|
|
||||||
vehicle_id: null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
material_id: '2',
|
|
||||||
material_name: null,
|
|
||||||
material_code: '200',
|
|
||||||
material_spec: null,
|
|
||||||
single_weight: null,
|
|
||||||
qty: '0.000',
|
|
||||||
assign_qty: '0.000',
|
|
||||||
unit_id: null,
|
|
||||||
pcsn: null,
|
|
||||||
vehicle_code: null,
|
|
||||||
vehicle_id: null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
material_id: '3',
|
|
||||||
"material_code": "02.03.05.01.00075",
|
|
||||||
"material_name": "密封球",
|
|
||||||
"material_spec": "D377-DQF-E-2150-01",
|
|
||||||
"single_weight": null,
|
|
||||||
"unit_name": null
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
data: null,
|
|
||||||
code: '200',
|
|
||||||
msg: '查询成功'
|
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
export const outStorageOrder = () => {
|
export const querySupp = (code) => {
|
||||||
let res = [{value: '1', text: 'a'},{"text": "直接调拨单", "value": "STK_TransferDirect"},{"text": "简单领料申请单","value": "ka7c19edf9d4b4b39b8cc4a06802163b0"},{"text": "其他出库单", "value": "STK_MisDelivery"}]
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const outStorageOrderList = (page, size, type) => {
|
|
||||||
let res = {
|
let res = {
|
||||||
"totalElements": 10,
|
message: 'ok',
|
||||||
"content": [
|
data: [
|
||||||
{
|
|
||||||
"code": "PPBOM241102856",
|
|
||||||
"form_type": "ka7c19edf9d4b4b39b8cc4a06802163b0",
|
|
||||||
"remark": "备注",
|
|
||||||
"create_time": "2024-10-20 21:41:50",
|
|
||||||
"create_name": "创建人",
|
|
||||||
"material_code": "04.01.DY.00531",
|
|
||||||
"qty": 0.0,
|
|
||||||
"sto_qty": 8888,
|
|
||||||
"plan_qty": 0.0,
|
|
||||||
"assign_qty": 0.0,
|
|
||||||
"unit_name": "单位",
|
|
||||||
"pcsn": "批次",
|
|
||||||
"stor_code": "FStockPallet",
|
|
||||||
"product_area": "A4",
|
|
||||||
"children": [
|
|
||||||
{
|
{
|
||||||
"code": "bbb",
|
supp_id: '1',
|
||||||
"material_name": "白色插座下线套 (模号587#)(色号12081407乳白)",
|
supp_code: 'supper1',
|
||||||
"material_code": "物料编码",
|
supp_name: 'supp_name',
|
||||||
"material_spec": "物料类型",
|
remark: 'remark'
|
||||||
"stor_code": "FStockPallet",
|
|
||||||
"product_area": "A4",
|
|
||||||
"qty": 1000.0,
|
|
||||||
"sto_qty": 99,
|
|
||||||
"plan_qty": 0.0,
|
|
||||||
"assign_qty": 0.0,
|
|
||||||
"unit_name": "单位",
|
|
||||||
"pcsn": "批次",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"code": "CCC",
|
|
||||||
"material_name": "物料名称",
|
|
||||||
"material_code": "物料编码",
|
|
||||||
"material_spec": "物料类型",
|
|
||||||
"stor_code": "FStockPallet",
|
|
||||||
"product_area": "A4",
|
|
||||||
"qty": 1000.0,
|
|
||||||
"sto_qty": 88,
|
|
||||||
"plan_qty": 0.0,
|
|
||||||
"assign_qty": 0.0,
|
|
||||||
"unit_name": "单位",
|
|
||||||
"pcsn": "批次"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
],
|
|
||||||
"data": {},
|
|
||||||
"code": "200",
|
|
||||||
"msg": ""
|
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
export const outStorageOrderConfirm = (code) => {
|
export const queryGroupInfo = (code) => {
|
||||||
let res = {
|
let res = {
|
||||||
"totalElements": 10,
|
message: 'ok',
|
||||||
"content": [
|
data: [
|
||||||
{
|
|
||||||
"code": "PPBOM241102856",
|
|
||||||
"form_type": "单据类型",
|
|
||||||
"remark": "备注",
|
|
||||||
"create_time": "2024-10-20 21:41:50",
|
|
||||||
"create_name": "创建人",
|
|
||||||
"material_code": "04.01.DY.00531",
|
|
||||||
"qty": 0.0,
|
|
||||||
"sto_qty": 8888,
|
|
||||||
"plan_qty": 0.0,
|
|
||||||
"assign_qty": 0.0,
|
|
||||||
"unit_name": "单位",
|
|
||||||
"pcsn": "批次",
|
|
||||||
"stor_code": "FStockPallet",
|
|
||||||
"product_area": "A4",
|
|
||||||
"children": [
|
|
||||||
{
|
{
|
||||||
"code": "bbb",
|
group_id: '1',
|
||||||
"material_name": "白色插座下线套 (模号587#)(色号12081407乳白)",
|
storagevehicle_code: 'supper1',
|
||||||
"material_code": "物料编码",
|
material_code: 'material_code',
|
||||||
"material_spec": "物料类型",
|
material_name: 'material_name'
|
||||||
"stor_code": "FStockPallet",
|
|
||||||
"product_area": "A4",
|
|
||||||
"qty": 10.0,
|
|
||||||
"sto_qty": 8888,
|
|
||||||
"plan_qty": 0.0,
|
|
||||||
"assign_qty": 0.0,
|
|
||||||
"unit_name": "单位",
|
|
||||||
"pcsn": "批次",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"code": "CCC",
|
|
||||||
"material_name": "物料名称",
|
|
||||||
"material_code": "物料编码",
|
|
||||||
"material_spec": "物料类型",
|
|
||||||
"stor_code": "FStockPallet",
|
|
||||||
"product_area": "A4",
|
|
||||||
"qty": 10.0,
|
|
||||||
"plan_qty": 0.0,
|
|
||||||
"assign_qty": 0.0,
|
|
||||||
"unit_id": "单位",
|
|
||||||
"pcsn": "批次"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
],
|
|
||||||
"data": {},
|
|
||||||
"code": "200",
|
|
||||||
"msg": ""
|
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
export const deviceManageTransf = () => {
|
export const queryBomInfo = (time, search) => {
|
||||||
let res = [{value: '1109', text: '一楼楼入库点'}, {value: '2109', text: '二楼楼入库点'}]
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const structattrPage = () => {
|
|
||||||
let res = {
|
let res = {
|
||||||
"totalElements": 10,
|
message: 'ok',
|
||||||
"content": [
|
data: [
|
||||||
{
|
|
||||||
"id": '1',
|
|
||||||
"code": "PPBOM241102856",
|
|
||||||
"struct_code": "struct_code",
|
|
||||||
"product_area": "A1",
|
|
||||||
"vehicle_code": "vehicle_code",
|
|
||||||
"material_code": "04.01.DY.00531",
|
|
||||||
"qty": 0.0,
|
|
||||||
"pcsn": "批次",
|
|
||||||
"stor_code": "FStockPallet"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"data": {},
|
|
||||||
"code": "200",
|
|
||||||
"msg": ""
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const getCtuOrderList = () => {
|
|
||||||
let res = {
|
|
||||||
"code": "200",
|
|
||||||
data: 'JDSCLLSQ250500293',
|
|
||||||
content: [{material_name: '1', status: '1'}, {material_name: '2', status: '1'}, {material_name: '3', status: '1'}, {material_name: '4', status: '1'}, {material_name: '5', status: '1'}, {material_name: '6', status: '1'}, {material_name: '7', status: '1'}, {material_name: '8', status: '1'}, {material_name: '9', status: '0'}, {material_name: '10', status: '1'}]
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const ctuOutConfirm = () => {
|
|
||||||
let res = {
|
|
||||||
"code": "200",
|
|
||||||
msg: 'ok'
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const getPointStatus = () => {
|
|
||||||
let res = {code: 'a', name: 'ldjlfjl', lock_type: '00'}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const queryTargetPoint = () => {
|
|
||||||
let res = {
|
|
||||||
code: '200',
|
|
||||||
site_code: 'a102',
|
|
||||||
msg: '查询成功!'
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const storList = () => {
|
|
||||||
let res = {
|
|
||||||
code: '200',
|
|
||||||
content: [{value: 'FicStockId', label: '虚拟库编码'}, {value: 'FStockId', label: '料箱编码'}, {value: 'FStockPallet', label: '托盘库编码'}]
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const getBillNoInfo = (id) => {
|
|
||||||
let res = [
|
|
||||||
{
|
|
||||||
code: '订单号1',
|
|
||||||
material_code: '1',
|
|
||||||
material_name: 'material_name',
|
|
||||||
material_spec: 'material_spec',
|
|
||||||
unit_name: 'unit_name',
|
|
||||||
qty: '100',
|
|
||||||
stockOrgId: 'StockOrgId',
|
|
||||||
ownerId_id: 'OwnerId_Id',
|
|
||||||
single_weight: '500',
|
|
||||||
pcsn: 'pcsn',
|
|
||||||
vehicle_code: 'T001',
|
|
||||||
unit_id: 'unit_id'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
code: '订单号2',
|
|
||||||
material_code: '2',
|
|
||||||
material_name: 'material_name',
|
|
||||||
material_spec: 'material_spec',
|
|
||||||
unit_name: 'unit_name',
|
|
||||||
qty: '100',
|
|
||||||
stockOrgId: 'StockOrgId',
|
|
||||||
ownerId_id: 'OwnerId_Id',
|
|
||||||
single_weight: '500',
|
|
||||||
pcsn: 'pcsn',
|
|
||||||
vehicle_code: '0001',
|
|
||||||
unit_id: 'unit_id'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const inStorageOrder = () => {
|
|
||||||
let res = [{value: '1', text: 'a'},{"text": "直接调拨单", "value": "STK_TransferDirect"},{"text": "简单领料申请单","value": "ka7c19edf9d4b4b39b8cc4a06802163b0"},{"text": "其他出库单", "value": "STK_MisDelivery"}]
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
||||||
export const inStorageConfirm = () => {
|
|
||||||
let res = {code: '200'}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const queryPick = () => {
|
|
||||||
let res = {
|
|
||||||
'code': 'a00001',
|
|
||||||
'product_area': 'A2',
|
|
||||||
'stor_code': 'FStockId',
|
|
||||||
"point_code": "001",
|
|
||||||
"material_code": "04.05.04.01.01.00100S-07",
|
|
||||||
"material_name": "不锈钢棒(SUS303F)(化学成分Cu≤0.5%)",
|
|
||||||
"material_spec": "LQF-02-07",
|
|
||||||
"prd_ppbom_no": "PPBOM25060",
|
|
||||||
"assign_qty": 80,
|
|
||||||
'qty': 35
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const savePickTask = (data) => {
|
|
||||||
let res = {
|
|
||||||
code: '200',
|
|
||||||
msg: 'ok'
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
export const queryMaterByVehicleCode = (code) => {
|
|
||||||
let res = {
|
|
||||||
"totalElements": 1,
|
|
||||||
"content": [
|
|
||||||
{
|
{
|
||||||
"id": "1926551433252048896",
|
bom_id: '1',
|
||||||
"group_id": "1926551433247854592",
|
device_code: 'device_code',
|
||||||
"stor_code": "FStockPallet",
|
device_name: 'device_name',
|
||||||
"vehicle_code": "T00000278",
|
bom_code: 'bom_code'
|
||||||
"material_id": "985577",
|
|
||||||
"pcsn": "001",
|
|
||||||
"qty": 13.000,
|
|
||||||
"frozen_qty": 0.000,
|
|
||||||
"is_lock": false,
|
|
||||||
"is_delete": false,
|
|
||||||
"unit_id": "100438",
|
|
||||||
"is_check": "1",
|
|
||||||
"parent_vehicle_code": null,
|
|
||||||
"has_child": false,
|
|
||||||
"source_form_type": null,
|
|
||||||
"source_form_id": null,
|
|
||||||
"task_code": "132799",
|
|
||||||
"form_data": {},
|
|
||||||
"update_time": "2025-06-11 21:35:40",
|
|
||||||
"update_name": null,
|
|
||||||
"create_time": "2025-05-25 16:10:29",
|
|
||||||
"create_name": "管理员",
|
|
||||||
"remark": "",
|
|
||||||
"proc_inst_id": null,
|
|
||||||
"prd_ppbom_no": "PPBOM250600121",
|
|
||||||
"need_pick": true,
|
|
||||||
"material_code": "02.03.05.01.00075",
|
|
||||||
"material_name": "密封球(S∅155×116×12×∅100)",
|
|
||||||
"material_spec": "D377-DQF-E-2150-01",
|
|
||||||
"single_weight": null,
|
|
||||||
"unit_name": null
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"data": null,
|
|
||||||
"code": "200",
|
|
||||||
"msg": "查询成功"
|
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
export const getStructCount = (code) => {
|
export const queryPointInfo = (time, search) => {
|
||||||
let res = {
|
let res = {
|
||||||
d: 100,
|
message: 'ok',
|
||||||
g: 200,
|
data: {
|
||||||
z: 300
|
point_cdoe: 'point_cdoe',
|
||||||
|
car_no: 'car_no',
|
||||||
|
point_cdoe1: 'point_cdoe1',
|
||||||
|
point_cdoe2: 'point_cdoe2',
|
||||||
|
rows: [{vehicle_code: 'vehicle_code', material_code: 'material_code', material_name: 'material_name'}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
export const updatePointqueryPointInfo = (time, search) => {
|
||||||
|
let res = {
|
||||||
|
message: 'ok',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
material_code: 'material_code',
|
||||||
|
material_name: 'material_name',
|
||||||
|
pcsn: 'pcsn',
|
||||||
|
qty: 'qty',
|
||||||
|
qty_unit_name: 'qty_unit_name'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user