This commit is contained in:
2023-10-08 16:01:14 +08:00
9 changed files with 219 additions and 252 deletions

View File

@@ -14,22 +14,14 @@
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
</view>
</view>
<!-- <view class="zd_wrapper">
<view class="input-wrap">
<view class="input-label" style="margin-right: 20upx;">客户标签打印</view>
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view> -->
</view>
<view class="submit-bar">
<button class="submit-button" @click="_submit">确认</button>
<!-- <button class="submit-button" @click="_virtualprintType">查询</button> -->
</view>
</view>
</template>
<script>
// import {virtualprintType} from '@/utils/getData2.js'
import NavBar from '@/components/NavBar.vue'
export default {
components: {
@@ -43,27 +35,12 @@
setTime: this.$store.getters.setTime / 1000
};
},
created () {
// this._virtualprintType()
},
methods: {
goIn () {
uni.redirectTo({
url: '/pages/login/login'
})
},
/** 选择器 */
selectChange(e) {
this.index = e
},
/** 打印机类型下拉框查询 */
async _virtualprintType () {
let res = await virtualprintType(this.addrip)
this.options = [...res.data]
// if (this.$store.getters.setPrintName !== '') {
// this.index = this.$store.getters.setPrintName
// }
},
_submit () {
if (this.addrip === '') {
uni.showToast({

View File

@@ -66,11 +66,17 @@
/** 获取设备下拉框 */
async _deviceInfo () {
let res = await deviceInfo()
res.map(el => {
this.$set(el, 'text', el.label)
})
this.options1 = [...res]
},
/** 获取设备状态下拉框 */
async _deviceStatus () {
let res = await deviceStatus()
res.map(el => {
this.$set(el, 'text', el.label)
})
this.options2 = [...res]
},
/** 确定 */

View File

@@ -4,7 +4,7 @@
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label">设备号</view>
<view class="filter_label">静置时间</view>
<view class="filter_input_wraper">
<input type="text" class="filter_input" v-model="val1">
</view>

View File

@@ -4,9 +4,15 @@
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label">设备号</view>
<view class="filter_label">托盘编码</view>
<view class="filter_input_wraper">
<input type="text" class="filter_input" v-model="val1">
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">物料数量</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val2">
</view>
</view>
</view>
@@ -15,20 +21,20 @@
<table>
<thead>
<tr>
<th>困料位置</th>
<th>设备号</th>
<th>静置时间</th>
<th>剩余静置时间</th>
<th>预计完成时间</th>
<th>起点1</th>
<th>终点1</th>
<th>起点2</th>
<th>终点2</th>
<th>任务状态</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{'checked': e.group_id === pkId}">
<td>{{e.point_code}}</td>
<td>{{e.device_code}}</td>
<td>{{e.standing_time}}</td>
<td>{{e.timeDifferenceMinutes}}</td>
<td>{{e.estimatedCompletionTimeString}}</td>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e.point_name1}}</td>
<td>{{e.point_name2}}</td>
<td>{{e.point_name3}}</td>
<td>{{e.point_name4}}</td>
<td>{{e.task_status}}</td>
</tr>
</tbody>
</table>
@@ -37,51 +43,50 @@
</view>
<view class="submit-bar">
<button class="submit-button" @tap="_forcedRestingShow">刷新</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !pkId}" :disabled="disabled" @tap="toSure">确认</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="toSure">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {forcedRestingShow, forcedRestingSubmit} from '@/utils/getData2.js'
import {dateTimeFtt} from '@/utils/utils.js'
import SearchBox from '@/components/SearchBox.vue'
import {manualSortingPackingTaskShow, manualSortingPackingTask} from '@/utils/getData2.js'
export default {
components: {
NavBar
NavBar,
SearchBox
},
data() {
return {
val1: '',
val2: '',
dataList: [],
pkId: '',
pkObj: {},
disabled: false
};
},
created () {
this._forcedRestingShow()
this._manualSortingPackingTaskShow()
},
methods: {
/** grid查询 */
async _forcedRestingShow () {
let res = await forcedRestingShow()
async _manualSortingPackingTaskShow () {
let res = await manualSortingPackingTaskShow()
this.dataList = [...res]
},
/** 确认 */
async toSure () {
this.disabled = true
if (!this.val1 || !this.pkId) {
if (!this.val1 || !this.val2) {
this.disabled = false
return
}
try {
let res = await forcedRestingSubmit(this.val1, this.pkId)
let res = await manualSortingPackingTask(this.val1, this.val2)
this.disabled = false
this.pkId = ''
this.pkObj = {}
this.val1 = ''
this._forcedRestingShow()
this.val2 = ''
this._manualSortingPackingTaskShow()
uni.showToast({
title: res.message,
icon: 'none'
@@ -89,10 +94,6 @@
} catch (e) {
this.disabled = false
}
},
toCheck (e) {
this.pkId = this.pkId === e.group_id ? '' : e.group_id
this.pkObj = this.pkId === e.group_id ? e : {}
}
}
}

View File

@@ -6,7 +6,7 @@
<view class="filter_item">
<view class="filter_label">木托盘编码</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
@@ -14,14 +14,14 @@
<span class="filter_label">钢托盘编码</span>
</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
<search-box v-model="val2" />
</view>
</view>
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !index1 || !index2}" :disabled="disabled1" @tap="toSure">确认</button>
<button class="submit-button" @tap="toCancle">取消</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="toSure">确认</button>
<button class="submit-button" @tap="toCancle">清空</button>
</view>
</view>
</template>
@@ -29,7 +29,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {deviceInfo, deviceStatus, deviceCheckVerify} from '@/utils/getData2.js'
import {manualSortingBindingVehicle} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -37,79 +37,40 @@
},
data() {
return {
options1: [],
index1: '',
options2: [],
index2: '',
disabled1: false
val1: '',
val2: '',
disabled: false
};
},
created () {
this._deviceInfo()
this._deviceStatus()
},
methods: {
/** 选择器 */
selectChange1(e) {
this.index1 = e
},
selectChange2(e) {
this.index2 = e
},
/** 获取设备下拉框 */
async _deviceInfo () {
let res = await deviceInfo()
this.options1 = [...res]
},
/** 获取设备状态下拉框 */
async _deviceStatus () {
let res = await deviceStatus()
this.options2 = [...res]
},
/** 确定 */
async toSure () {
this.disabled1 = true
if (!this.index1) {
uni.showToast({
title: '设备号不能为空',
icon: 'none'
})
this.disabled1 = false
return
}
if (!this.index2) {
uni.showToast({
title: '状态不能为空',
icon: 'none'
})
this.disabled1 = false
this.disabled = true
if (!this.val1 || !this.val2) {
this.disabled = false
return
}
try {
let userName = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : ''
let res = await deviceCheckVerify(this.index1, userName, this.index2)
this.disabled1 = false
this.index1 = ''
this.index2 = ''
let res = await manualSortingBindingVehicle(this.val2, this.val1)
this.disabled = false
this.val1 = ''
this.val2 = ''
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
this.disabled = false
}
},
toCancle () {
this.disabled1 = false
this.index1 = ''
this.index2 = ''
this.disabled = false
this.val1 = ''
this.val2 = ''
}
}
}
</script>
<style lang="stylus" scoped>
.filter_item_1, .filter_input_wraper_1
align-items: flex-start
height 210rpx
</style>

View File

@@ -7,26 +7,26 @@
<table>
<thead>
<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>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.checked}">
<td><span class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}" @tap="toCheck(e)">&#xe66b;</span></td>
<td>{{e.device_code}}</td>
<td @tap="toJump(e)">{{e.device_name}}</td>
<td>{{e.status_name}}</td>
<td>{{e.plan_start_date}}</td>
<td></td>
<td></td>
<td><input type="number" class="sin_input"></td>
<tr v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{'checked': e.workorder_code === pkId}">
<td>{{e.workorder_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.workorder_status}}</td>
<td>{{e.operator}}</td>
<td>{{e.create_name}}</td>
<td><input type="number" class="sin_input" v-model="e.plan_qty"></td>
<td>{{e.real_qty}}</td>
</tr>
</tbody>
</table>
@@ -34,8 +34,8 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="toSure1">开工</button>
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="toSure1">完工</button>
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="toSure1">开工</button>
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled2" @tap="toSure2">完工</button>
</view>
</view>
</template>
@@ -43,7 +43,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {coolIOQuery, confirmInstor, statusList} from '@/utils/getData2.js'
import {manualSortingOrders, manualSortingProductionScheduling, manualSortingProductionComplete} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -52,56 +52,68 @@
data() {
return {
dataList: [],
checkArr: [],
disabled: false
pkId: '',
pkObj: {},
disabled1: false,
disabled2: false
};
},
created () {
this._manualSortingOrders()
},
methods: {
/** 下拉框查询 */
async _statusList () {
let res = await statusList()
this.options = [...res.data]
},
/** grid查询 */
async _empOutgetIvt (e) {
let res = await empOutgetIvt(e)
res.data.map(el => {
this.$set(el, 'checked', false)
})
this.dataList = [...res.data]
async _manualSortingOrders () {
let res = await manualSortingOrders()
this.dataList = [...res]
},
/** 确认 */
async _confirmInstor () {
this.disabled = true
if (!this.val1 || !this.pkId || !this.index) {
this.disabled = false
toCheck (e) {
this.pkId = this.pkId === e.workorder_code ? '' : e.workorder_code
this.pkObj = this.pkId === e.workorder_code ? e : {}
},
/** 开工 */
async toSure1 () {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
try {
let res = await confirmInstor(this.pkObj, this.val1, this.index)
this.disabled = false
let userName = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : ''
let res = await manualSortingProductionScheduling(this.pkId, userName)
this.disabled1 = false
this.pkId = ''
this.pkObj = {}
this.searchList()
this._manualSortingOrders()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
this.disabled1 = false
}
},
toCheck (e) {
e.checked = !e.checked
this.checkArr = this.dataList.filter(i => { return i.checked === true })
},
toJump (e) {
this.$store.dispatch('setPublicObj', e)
uni.navigateTo({
url: '/pages/warehouse/WarehouseReceiptDetails'
})
/** 完工 */
async toSure2 () {
this.disabled2 = true
if (!this.pkId) {
this.disabled2 = false
return
}
try {
let userName = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : ''
let res = await manualSortingProductionComplete(this.pkId, userName)
this.disabled2 = false
this.pkId = ''
this.pkObj = {}
this._manualSortingOrders()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled2 = false
}
}
}
}

View File

@@ -4,9 +4,15 @@
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label">设备号</view>
<view class="filter_label">托盘编码</view>
<view class="filter_input_wraper">
<input type="text" class="filter_input" v-model="val1">
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">物料数量</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val2">
</view>
</view>
</view>
@@ -15,20 +21,18 @@
<table>
<thead>
<tr>
<th>困料位置</th>
<th>设备号</th>
<th>静置时间</th>
<th>剩余静置时间</th>
<th>预计完成时间</th>
<th>起点</th>
<th>终点</th>
<th>任务状态</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{'checked': e.group_id === pkId}">
<td>{{e.point_code}}</td>
<td>{{e.device_code}}</td>
<td>{{e.standing_time}}</td>
<td>{{e.timeDifferenceMinutes}}</td>
<td>{{e.estimatedCompletionTimeString}}</td>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e.point_name1}}</td>
<td>{{e.point_name2}}</td>
<td>{{e.task_status}}</td>
<td>{{e.remark}}</td>
</tr>
</tbody>
</table>
@@ -37,51 +41,50 @@
</view>
<view class="submit-bar">
<button class="submit-button" @tap="_forcedRestingShow">刷新</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !pkId}" :disabled="disabled" @tap="toSure">确认</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="toSure">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {forcedRestingShow, forcedRestingSubmit} from '@/utils/getData2.js'
import {dateTimeFtt} from '@/utils/utils.js'
import SearchBox from '@/components/SearchBox.vue'
import {callingResidueMaterialTaskShow, callingResidueMaterialTask} from '@/utils/getData2.js'
export default {
components: {
NavBar
NavBar,
SearchBox
},
data() {
return {
val1: '',
val2: '',
dataList: [],
pkId: '',
pkObj: {},
disabled: false
};
},
created () {
this._forcedRestingShow()
this._callingResidueMaterialTaskShow()
},
methods: {
/** grid查询 */
async _forcedRestingShow () {
let res = await forcedRestingShow()
async _callingResidueMaterialTaskShow () {
let res = await callingResidueMaterialTaskShow()
this.dataList = [...res]
},
/** 确认 */
async toSure () {
this.disabled = true
if (!this.val1 || !this.pkId) {
if (!this.val1 || !this.val2) {
this.disabled = false
return
}
try {
let res = await forcedRestingSubmit(this.val1, this.pkId)
let res = await callingResidueMaterialTask(this.val1, this.val2)
this.disabled = false
this.pkId = ''
this.pkObj = {}
this.val1 = ''
this._forcedRestingShow()
this.val2 = ''
this._callingResidueMaterialTaskShow()
uni.showToast({
title: res.message,
icon: 'none'
@@ -89,10 +92,6 @@
} catch (e) {
this.disabled = false
}
},
toCheck (e) {
this.pkId = this.pkId === e.group_id ? '' : e.group_id
this.pkObj = this.pkId === e.group_id ? e : {}
}
}
}

View File

@@ -1,16 +0,0 @@
import request from './request.js'
// 登录
export const handLogin = (user, password) => request({
url:'mobile/auth/login',
data: {
username: user,
password: password
}
})
// 测试状态码报错接口
export const handRequest = () => request({
url:'getInfo/4',
data: {}
})

View File

@@ -21,43 +21,6 @@ export const handLogin = (user, password) => request({
password: password
}
})
// export const handLogin = (user, password) => {
// let res = {
// "user": {
// "user": {
// "user_id": "1",
// "username": "admin",
// "person_name": "管理员",
// "gender": "男",
// "phone": "18312365896",
// "email": "201507802@qq.com",
// "avatar_name": "avatar-20200806032259161.png",
// "avatar_path": "/Users/jie/Documents/work/me/admin/eladmin/~/avatar/avatar-20200806032259161.png",
// "password": "f52020dca765fd3943ed40a615dc2c5c",
// "is_admin": true,
// "is_used": true,
// "pwd_reset_user_id": 0,
// "pwd_reset_time": null,
// "create_id": null,
// "create_name": "",
// "create_time": "2022-12-01 00:00:00",
// "update_id": "1",
// "update_name": "admin",
// "update_time": "2023-05-06 14:00:14",
// "extperson_id": null,
// "extuser_id": null
// }
// },
// "token": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIxIiwicm5TdHIiOiIyZENCQk1uYW03ellTb21aVVN2ZzZnMndJOHJ0V0RmciIsImxvZ2luSW5mbyI6eyJpZCI6IjEiLCJ1c2VybmFtZSI6ImFkbWluIiwicHJlc29uTmFtZSI6IueuoeeQhuWRmCIsInVzZXIiOnsidXNlcl9pZCI6IjEiLCJ1c2VybmFtZSI6ImFkbWluIiwicGVyc29uX25hbWUiOiLnrqHnkIblkZgiLCJnZW5kZXIiOiLnlLciLCJwaG9uZSI6IjE4MzEyMzY1ODk2IiwiZW1haWwiOiIyMDE1MDc4MDJAcXEuY29tIiwiYXZhdGFyX25hbWUiOiJhdm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Pyns_MCRCw9vwNogGiCAOxzSd_9-KKythjc9dU"
// }
// return res
// }
// 测试状态码报错接口
export const handRequest = () => request({
url:'getInfo/4',
data: {}
})
/**
* 设备点检
@@ -83,13 +46,6 @@ export const deviceCheckVerify = (code, user, remark, status) => request({
}
})
// 1.3打印机类型
export const virtualprintType = (url) => request1({
url: `${url}/` + 'api/pda/virtual/printType',
data: {}
})
/**
* 强制静置
*/
@@ -105,4 +61,75 @@ export const forcedRestingSubmit = (stime, id) => request({
stand_time: stime,
group_id: id
}
})
/**
* 分拣排产
*/
// 显示工单/刷新
export const manualSortingOrders = () => request({
url:'api/pda/manualSorting/orders',
data: {}
})
// 开工
export const manualSortingProductionScheduling = (code, user) => request({
url:'api/pda/manualSorting/productionScheduling',
data: {
workorder_code: code,
username: user
}
})
// 完工
export const manualSortingProductionComplete = (code, user) => request({
url:'api/pda/manualSorting/productionComplete',
data: {
workorder_code: code,
username: user
}
})
/**
* 剩料入库
*/
// 刷新
export const callingResidueMaterialTaskShow = () => request({
url:'api/pda/manualSorting/callingResidueMaterialTaskShow',
data: {}
})
// 确认
export const callingResidueMaterialTask = (code, qty) => request({
url:'api/pda/manualSorting/callingResidueMaterialTask',
data: {
vehicle_code: code,
qty: qty
}
})
/**
* 托盘绑定
*/
// 确认
export const manualSortingBindingVehicle = (ocode, tcode) => request({
url:'api/pda/manualSorting/bindingVehicle',
data: {
origin_vehicle_code: ocode,
target_vehicle_code: tcode
}
})
/**
* 包装入库
*/
// 刷新
export const manualSortingPackingTaskShow = () => request({
url:'api/pda/manualSorting/packingTaskShow',
data: {}
})
// 确认
export const manualSortingPackingTask = (code, qty) => request({
url:'/api/pda/manualSorting/packingTask',
data: {
vehicle_code: code,
qty: qty
}
})