Commit 19c3091b authored by 沈翠玲's avatar 沈翠玲

优化需求

parent f78ee80a
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
methods: { methods: {
async getList() { async getList() {
const res = await this.$u.api.getMesWorkunitList(this.tableParams) const res = await this.$u.api.getMesWorkunitList(this.tableParams)
console.log(res, 'res')
if (res.code == 200) { if (res.code == 200) {
this.tableData=res.rows this.tableData=res.rows
} }
......
...@@ -15,20 +15,16 @@ ...@@ -15,20 +15,16 @@
<!-- </view>--> <!-- </view>-->
<view> <view>
<u-form :model="tableParams" labelAlign="right" class="tableForm"> <u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item label="编排单号" label-width="70px" name="arrangeCode"> <u-form-item label="扫码" label-width="50px" name="arrangeCode">
<uni-easyinput type="text" suffixIcon="scan" v-model="tableParams.arrangeCode" style="width: 1.15rem" <uni-easyinput type="text" suffixIcon="scan" v-model="tableParams.arrangeCode" style="width: 200px"
@iconClick="iconClickArrangeCode" placeholder="请输入编排单号" /> @iconClick="iconClickArrangeCode" placeholder="请扫码" />
</u-form-item>
<u-form-item label="生产工单编号" label-width="95px" name="workorderCode">
<uni-easyinput type="text" suffixIcon="scan" v-model="tableParams.workorderCode" style="width: 1.15rem"
@iconClick="iconClickWorkorderCode" placeholder="请输入生产工单编号" />
</u-form-item> </u-form-item>
<u-form-item name="allowProduce" label-width="80px" label="当前可加工"> <u-form-item name="allowProduce" label-width="80px" label="当前可加工">
<uni-data-checkbox v-model="tableParams.allowProduce" @change="getTaskList()" <uni-data-checkbox v-model="tableParams.allowProduce" @change="getTaskList()"
:localdata="allowProduceLocal"></uni-data-checkbox> :localdata="allowProduceLocal"></uni-data-checkbox>
</u-form-item> </u-form-item>
<u-form-item name="allowProduce"> <u-form-item name="allowProduce">
<u-button @click="getTaskList()" type="primary" size="medium" style="width: 0.5rem">搜索</u-button> <u-button @click="getTaskList()" type="primary" size="medium" style="width: 50px">搜索</u-button>
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
...@@ -90,7 +86,7 @@ ...@@ -90,7 +86,7 @@
<u-button type="primary" @click="commonClick('FeedingInspection')">投料校验</u-button> <u-button type="primary" @click="commonClick('FeedingInspection')">投料校验</u-button>
<u-button type="primary" @click="commonClick('RecoilMaterial')">反冲料登记</u-button> <u-button type="primary" @click="commonClick('RecoilMaterial')">反冲料登记</u-button>
<u-button type="primary" @click="commonClick('MaterialRequest')">料申请</u-button> <u-button type="primary" @click="commonClick('MaterialRequest')">料申请</u-button>
<u-button type="primary" @click="commonClick('MaterialReturn')">退料申请</u-button> <u-button type="primary" @click="commonClick('MaterialReturn')">退料申请</u-button>
<u-button type="primary" @click="commonClick('ViewPpicture')">查看图片</u-button> <u-button type="primary" @click="commonClick('ViewPpicture')">查看图片</u-button>
<!-- <u-button type="primary" @click="commonClick('jobAssignment')">作业分派</u-button> --> <!-- <u-button type="primary" @click="commonClick('jobAssignment')">作业分派</u-button> -->
...@@ -539,15 +535,15 @@ ...@@ -539,15 +535,15 @@
cancelText="关闭" :show-confirm-button="false" cancelText="关闭" :show-confirm-button="false"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }" :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="feedingInspectionVisible" width="100%" height="100%" :content-style="{ height: '87vh' }"> v-model="feedingInspectionVisible" width="100%" height="100%" :content-style="{ height: '87vh' }">
<view style="display: flex; width: 100%;"> <view style="display: flex; width: 100%;height:100%">
<view style="width: 510px" v-if="feedingInspectionVisible"> <view style="width: 510px" v-if="feedingInspectionVisible">
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<app-scan ref="appScan" @getCode="feedingInspectionScan"></app-scan> <app-scan ref="appScan" @getCode="feedingInspectionScan"></app-scan>
<!-- #endif --> <!-- #endif -->
</view> </view>
<view class="list-bar" style="width: calc(100% - 510px);"> <view class="list-bar" style="width: calc(100% - 510px);height:90%;">
<scroll-view scroll-y="true" scroll-x="true" class="scroll-list" show-scrollbar <scroll-view scroll-y="true" scroll-x="true" class="scroll-list" show-scrollbar
:style="{ height: this.screenHeight - 200 + 'px'}" @touchmove.stop> :style="{ height: '100%'}" @touchmove.stop>
<uni-table border stripe :loading="loading" emptyText="未查询到数据" class="mynotable"> <uni-table border stripe :loading="loading" emptyText="未查询到数据" class="mynotable">
<uni-tr> <uni-tr>
<uni-th width="100px" align="center">操作</uni-th> <uni-th width="100px" align="center">操作</uni-th>
...@@ -565,7 +561,7 @@ ...@@ -565,7 +561,7 @@
</view> </view>
</uni-td> </uni-td>
<uni-td align="center">{{ line.attr3 == 1 ? '校验' : '未校验' }}</uni-td> <uni-td align="center">{{ line.attr3 == 1 ? '校验' : '未校验' }}</uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td> <uni-td align="center">{{ line.itemCode.substring(line.itemCode.length - 8, line.itemCode) }}</uni-td>
<uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.quantityIssued }}</uni-td> <uni-td align="center">{{ line.quantityIssued }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td> <uni-td align="center">{{ line.batchCode }}</uni-td>
...@@ -581,7 +577,7 @@ ...@@ -581,7 +577,7 @@
cancelText="关闭" :show-confirm-button="false" height="100%" cancelText="关闭" :show-confirm-button="false" height="100%"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }" :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="recoilMaterialVisible" width="100%" :content-style="{ height: '87vh' }"> v-model="recoilMaterialVisible" width="100%" :content-style="{ height: '87vh' }">
<view style="display: flex"> <view style="display: flex;width: 100%;height:100%">
<view style="width: 510px" v-if="recoilMaterialVisible"> <view style="width: 510px" v-if="recoilMaterialVisible">
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<app-scan ref="appScan" @getCode="recoilMaterialScan" v-if="!recoilMaterialFlag"></app-scan> <app-scan ref="appScan" @getCode="recoilMaterialScan" v-if="!recoilMaterialFlag"></app-scan>
...@@ -593,8 +589,8 @@ ...@@ -593,8 +589,8 @@
position: 'absolute', position: 'absolute',
background: 'black'}"></view> background: 'black'}"></view>
</view> </view>
<view class="list-bar" style="width: calc(100% - 510px);"> <view class="list-bar" style="width: calc(100% - 510px);height:90%;">
<scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ height: this.screenHeight - 200 + 'px'}" @touchmove.stop> <scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ height: '100%'}" @touchmove.stop>
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据" class="mynotable"> <uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据" class="mynotable">
<uni-tr> <uni-tr>
<!-- <uni-th width="200px" align="center">操作</uni-th> --> <!-- <uni-th width="200px" align="center">操作</uni-th> -->
...@@ -640,7 +636,7 @@ ...@@ -640,7 +636,7 @@
</view> </view>
</u-modal> </u-modal>
<u-modal title="料申请" @confirm="materialRequestSave()" show-cancel-button <u-modal title="料申请" @confirm="materialRequestSave()" show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }" :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="materialRequestVisible" width="1300rpx"> v-model="materialRequestVisible" width="1300rpx">
<view class="list-bar"> <view class="list-bar">
...@@ -658,7 +654,7 @@ ...@@ -658,7 +654,7 @@
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4.5"> <u-col span="4.5">
<u-form-item label="料原因" prop="pickingReason"> <u-form-item label="料原因" prop="pickingReason">
<uni-data-select v-model="curTaskInfo.pickingReason" :localdata="reasonList" <uni-data-select v-model="curTaskInfo.pickingReason" :localdata="reasonList"
@change="pickingCause"></uni-data-select> @change="pickingCause"></uni-data-select>
</u-form-item> </u-form-item>
...@@ -671,7 +667,7 @@ ...@@ -671,7 +667,7 @@
<uni-th width="100px" align="center">操作</uni-th> <uni-th width="100px" align="center">操作</uni-th>
<uni-th width="110px" align="center">产品物料编码</uni-th> <uni-th width="110px" align="center">产品物料编码</uni-th>
<uni-th width="110px" align="center">产品物料名称</uni-th> <uni-th width="110px" align="center">产品物料名称</uni-th>
<uni-th width="80px" align="center">取数量</uni-th> <uni-th width="80px" align="center">取数量</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line, index) in materialRequestArrays" :key="index"> <uni-tr v-for="(line, index) in materialRequestArrays" :key="index">
<uni-td align="center"> <uni-td align="center">
...@@ -689,7 +685,7 @@ ...@@ -689,7 +685,7 @@
</view> </view>
</u-modal> </u-modal>
<u-modal title="料申请数量" @confirm="materialRequestSetting()" show-cancel-button <u-modal title="料申请数量" @confirm="materialRequestSetting()" show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }" :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="materialRequestFormVisible" width="700rpx"> v-model="materialRequestFormVisible" width="700rpx">
<view class=""> <view class="">
...@@ -703,7 +699,7 @@ ...@@ -703,7 +699,7 @@
</u-row> </u-row>
<u-row> <u-row>
<u-col> <u-col>
<u-form-item label="料数量"> <u-form-item label="料数量">
<u-number-box v-model="materialRequestFormData.applyNum" :long-press="false" :positive-integer="false" <u-number-box v-model="materialRequestFormData.applyNum" :long-press="false" :positive-integer="false"
:size="50" :input-width="190"></u-number-box> :size="50" :input-width="190"></u-number-box>
</u-form-item> </u-form-item>
...@@ -1532,7 +1528,8 @@ export default { ...@@ -1532,7 +1528,8 @@ export default {
iconClickArrangeCode() { iconClickArrangeCode() {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
console.log(res, 'res'); // console.log(res, 'res');
this.tableParams.arrangeCode = res.result
this.getTaskList({ arrangeCode: res.result }); this.getTaskList({ arrangeCode: res.result });
}, },
fail: () => { fail: () => {
...@@ -1540,17 +1537,6 @@ export default { ...@@ -1540,17 +1537,6 @@ export default {
} }
}); });
}, },
iconClickWorkorderCode(data) {
uni.scanCode({
success: (res) => {
console.log(res, 'res');
this.getTaskList({ workorderCode: res.result });
},
fail: () => {
this.$u.toast('扫码失败,请重新扫描');
}
});
},
numclik(...arg) { numclik(...arg) {
console.log('99999999', arg); console.log('99999999', arg);
}, },
...@@ -1937,8 +1923,14 @@ export default { ...@@ -1937,8 +1923,14 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
let currentIndex = 0
// 过滤可加工数量为0的数据 // 过滤可加工数量为0的数据
this.tableData = res.rows.map((item) => { this.tableData = res.rows.map((item, index) => {
if (item.location) {
currentIndex = index
item['checked'] = true
this.tableSelectData.push(item)
}
return { return {
...item, ...item,
scheduleStartDateStr: item.scheduleStartDate.substring(2, 16), scheduleStartDateStr: item.scheduleStartDate.substring(2, 16),
...@@ -1948,7 +1940,12 @@ export default { ...@@ -1948,7 +1940,12 @@ export default {
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
this.curTaskInfo = this.tableData[0]; this.curTaskInfo = this.tableData[0];
this.getMaterialUsageRecordList(); this.getMaterialUsageRecordList();
} else { this.$nextTick(()=>{
const dom = this.$refs['zbtable'].$el.children[0].children[0].children[1].children[0].children[0]
const itemHeight = dom.querySelector('.item-tr').offsetHeight
const enableHeight = dom.querySelector('.zb-table-fixed').scrollHeight - dom.offsetHeight
dom.scrollTop = (itemHeight * currentIndex) > enableHeight ? enableHeight : (itemHeight * currentIndex)
})
} }
} }
}).catch(e=>{ }).catch(e=>{
...@@ -2883,7 +2880,7 @@ export default { ...@@ -2883,7 +2880,7 @@ export default {
display: flex; display: flex;
margin: 20rpx 0rpx; margin: 20rpx 0rpx;
/deep/ .uni-data-checklist .checklist-group .checklist-box { /deep/ .uni-data-checklist .checklist-group .checklist-box {
margin-right: 0.15rem; margin-right: 15px;
} }
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0) !important; box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0) !important;
background-color: transparent !important; background-color: transparent !important;
} }
html { html {
font-size: calc(100vw / 7.5); // font-size: calc(100vw / 7.5);
} }
\ No newline at end of file
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