Commit 97f5de25 authored by 张海景's avatar 张海景

update:修改任务工单加搜索功能

parent b0481d49
...@@ -13,14 +13,30 @@ ...@@ -13,14 +13,30 @@
<!-- &lt;!&ndash; <u-button type="primary" @click="commonClick('KnifeTemp')">刀模上架</u-button>&ndash;&gt;--> <!-- &lt;!&ndash; <u-button type="primary" @click="commonClick('KnifeTemp')">刀模上架</u-button>&ndash;&gt;-->
<!-- &lt;!&ndash; <u-button type="primary" @click="commonClick('')">生产投料</u-button>&ndash;&gt;--> <!-- &lt;!&ndash; <u-button type="primary" @click="commonClick('')">生产投料</u-button>&ndash;&gt;-->
<!-- </view>--> <!-- </view>-->
<view>
<u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item label="编排单号" label-width="70px" name="arrangeCode">
<uni-easyinput type="text" suffixIcon="scan" v-model="tableParams.arrangeCode" @iconClick="iconClickArrangeCode" placeholder="请输入编排单号" />
</u-form-item>
<u-form-item label="生产工单编号" label-width="100px" name="workorderCode">
<uni-easyinput type="text" suffixIcon="scan" v-model="tableParams.workorderCode" @iconClick="iconClickWorkorderCode" placeholder="请输入生产工单编号" />
</u-form-item>
<u-form-item name="allowProduce" label-width="80px" label="当前可加工">
<uni-data-checkbox v-model="tableParams.allowProduce" @change="getTaskList" :localdata="allowProduceLocal"></uni-data-checkbox>
</u-form-item>
<u-form-item name="allowProduce" label-width="10px" >
<u-button @click="getTaskList" type="primary" size="medium">搜索</u-button>
</u-form-item>
</u-form>
</view>
<view class="prod-body-left-task"> <view class="prod-body-left-task">
<zb-table <zb-table
ref="zbtable" ref="zbtable"
:columns="tableColumn" :columns="tableColumn"
:stripe="true" :stripe="true"
rowKey="taskWorkunitId" rowKey="taskWorkunitId"
:isTrClassStyle="isTrClassStyle" :isTrClassStyle="isTrClassStyle"
@rowClick="rowClick" @rowClick="rowClick"
@toggleRowSelection="toggleRowSelection" @toggleRowSelection="toggleRowSelection"
@toggleAllSelection="toggleAllSelection" @toggleAllSelection="toggleAllSelection"
...@@ -593,15 +609,32 @@ ...@@ -593,15 +609,32 @@
import SearchInput from '@/components/ScanInput/index.vue'; import SearchInput from '@/components/ScanInput/index.vue';
import dModelList from './components/dModelList.vue'; import dModelList from './components/dModelList.vue';
import userPersonnel from './components/userPersonnel.vue'; import userPersonnel from './components/userPersonnel.vue';
import UButton from '../../../uview-ui/components/u-button/u-button.vue';
export default { export default {
name: 'ProdReport', name: 'ProdReport',
components: { components: {
SearchInput, SearchInput,
dModelList, dModelList,
userPersonnel userPersonnel,
UButton
}, },
data() { data() {
return { return {
tableParams: {
allowProduce: 1,
workorderCode: '',
arrangeCode: ''
},
allowProduceLocal: [
{
text: '是',
value: 1
},
{
text: '否',
value: 0
}
],
stopReasonForm: { stopReasonForm: {
reason: null, reason: null,
desc: null desc: null
...@@ -982,6 +1015,34 @@ userTempVisible: false, ...@@ -982,6 +1015,34 @@ userTempVisible: false,
// e.stopPropagation() // e.stopPropagation()
// } // }
// }, // },
iconClickArrangeCode() {
uni.scanCode(
{
success:(res)=> {
console.log(res, 'res')
this.tableParams.arrangeCode = res.result
this.getTaskList()
},
fail: ()=> {
this.$u.toast('扫码失败,请重新扫描')
}
}
)
},
iconClickWorkorderCode(data) {
uni.scanCode(
{
success:(res)=> {
console.log(res, 'res')
this.tableParams.workorderCode = res.result
this.getTaskList()
},
fail: ()=> {
this.$u.toast('扫码失败,请重新扫描')
}
}
)
},
numclik(...arg) { numclik(...arg) {
console.log('99999999', arg); console.log('99999999', arg);
}, },
...@@ -1244,17 +1305,16 @@ userTempVisible: false, ...@@ -1244,17 +1305,16 @@ userTempVisible: false,
getTaskList() { getTaskList() {
this.form = {}; this.form = {};
const t = this; const t = this;
console.log(this.tableParams, 'this.tableParams')
this.$u.api this.$u.api
.getTaskList({ .getTaskList({
workunitId: t.vuex_workunit.workunitId workunitId: t.vuex_workunit.workunitId,
...this.tableParams
}) })
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
// 过滤可加工数量为0的数据 // 过滤可加工数量为0的数据
this.tableData = res.rows.filter(item => { this.tableData = res.rows
return !(item.quantityWait == '0')
})
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
this.curTaskInfo = this.tableData[0]; this.curTaskInfo = this.tableData[0];
this.getMaterialUsageRecordList(); this.getMaterialUsageRecordList();
...@@ -1732,6 +1792,11 @@ userTempVisible: false, ...@@ -1732,6 +1792,11 @@ userTempVisible: false,
width: 40%; width: 40%;
} }
.tableForm{
display:flex;
margin:20rpx 0rpx;
}
.task_card { .task_card {
width: 90%; width: 90%;
margin: 5px; margin: 5px;
...@@ -1794,7 +1859,7 @@ userTempVisible: false, ...@@ -1794,7 +1859,7 @@ userTempVisible: false,
} }
.prod-body-left-task { .prod-body-left-task {
height: calc(100vh - 80rpx); height: calc(100vh - 200rpx);
min-height: 400rpx; min-height: 400rpx;
border: 1px solid rgb(232, 232, 232); border: 1px solid rgb(232, 232, 232);
/deep/ .item-tr.trbg .item-td{ /deep/ .item-tr.trbg .item-td{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment