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

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

parent b0481d49
......@@ -13,8 +13,24 @@
<!-- &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;-->
<!-- </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">
<zb-table
ref="zbtable"
:columns="tableColumn"
......@@ -593,15 +609,32 @@
import SearchInput from '@/components/ScanInput/index.vue';
import dModelList from './components/dModelList.vue';
import userPersonnel from './components/userPersonnel.vue';
import UButton from '../../../uview-ui/components/u-button/u-button.vue';
export default {
name: 'ProdReport',
components: {
SearchInput,
dModelList,
userPersonnel
userPersonnel,
UButton
},
data() {
return {
tableParams: {
allowProduce: 1,
workorderCode: '',
arrangeCode: ''
},
allowProduceLocal: [
{
text: '是',
value: 1
},
{
text: '否',
value: 0
}
],
stopReasonForm: {
reason: null,
desc: null
......@@ -982,6 +1015,34 @@ userTempVisible: false,
// 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) {
console.log('99999999', arg);
},
......@@ -1244,17 +1305,16 @@ userTempVisible: false,
getTaskList() {
this.form = {};
const t = this;
console.log(this.tableParams, 'this.tableParams')
this.$u.api
.getTaskList({
workunitId: t.vuex_workunit.workunitId
workunitId: t.vuex_workunit.workunitId,
...this.tableParams
})
.then((res) => {
if (res.code === 200) {
// 过滤可加工数量为0的数据
this.tableData = res.rows.filter(item => {
return !(item.quantityWait == '0')
})
this.tableData = res.rows
if (this.tableData.length > 0) {
this.curTaskInfo = this.tableData[0];
this.getMaterialUsageRecordList();
......@@ -1732,6 +1792,11 @@ userTempVisible: false,
width: 40%;
}
.tableForm{
display:flex;
margin:20rpx 0rpx;
}
.task_card {
width: 90%;
margin: 5px;
......@@ -1794,7 +1859,7 @@ userTempVisible: false,
}
.prod-body-left-task {
height: calc(100vh - 80rpx);
height: calc(100vh - 200rpx);
min-height: 400rpx;
border: 1px solid rgb(232, 232, 232);
/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