Commit fc72fc6b authored by 沈翠玲's avatar 沈翠玲

报工

parent f92a6d68
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
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="show" width="100%" height="100%" :content-style="{ height: '87vh' }"> v-model="show" width="100%" height="100%" :content-style="{ height: '87vh' }">
<zb-table :columns="editFeedingColumn" :stripe="true" :border="true" :data="editFeedingTable" style="height: calc(100% - 40px)"> <zb-table :columns="editFeedingColumn" :stripe="true" :border="true" :data="editFeedingTable" style="height: calc(100% - 40px)" class="editzbtable">
<template slot="number" slot-scope="scope"> <template slot="number" slot-scope="scope">
<span>{{ getSumNumber(scope.row) }}</span> <span>{{ getSumNumber(scope.row) }}</span>
</template> </template>
...@@ -36,21 +36,21 @@ ...@@ -36,21 +36,21 @@
</u-modal> </u-modal>
<!-- 添加或修改生产报工记录对话框 --> <!-- 添加或修改生产报工记录对话框 -->
<u-modal :title="title" v-model="open" width="80%" :show-confirm-button="form.status =='PREPARE' && optType !='view' " show-cancel-button <u-modal :title="title" v-model="open" width="80%" :show-confirm-button="form.status =='PREPARE' && optType !='view' " show-cancel-button
@confirm="submitForm" :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }" :content-style="{ padding: '10rpx' }"> @confirm="submitForm" :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }" :content-style="{ padding: '20rpx', 'max-height': '87vh' }">
<u-form ref="form" :model="form" label-width="100px"> <u-form ref="form" :model="form" label-width="100px">
<u-row> <u-row>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="报工类型" prop="feedbackType"> <u-form-item label="报工类型" prop="feedbackType">
<uni-data-select v-model="form.feedbackType" <uni-data-select v-model="form.feedbackType"
:localdata="dict.type.mes_feedback_type" disabled></uni-data-select> :localdata="dict.type.mes_feedback_type" disabled></uni-data-select>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col v-if="form.feedbackType == 'ASSIST_PROCESS'" :span="4"> <u-col v-if="form.feedbackType == 'ASSIST_PROCESS'" :span="6">
<u-form-item label="外协单号" prop="assistProcessCode"> <u-form-item label="外协单号" prop="assistProcessCode">
{{form.assistProcessCode}} {{form.assistProcessCode}}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col v-if="form.feedbackType == 'ASSIST_PROCESS'" :span="4"> <u-col v-if="form.feedbackType == 'ASSIST_PROCESS'" :span="6">
<u-form-item label="是否关单" prop="closeType"> <u-form-item label="是否关单" prop="closeType">
<u-radio-group v-model="form.closeType" disabled> <u-radio-group v-model="form.closeType" disabled>
<u-radio :label="1"></u-radio> <u-radio :label="1"></u-radio>
...@@ -58,77 +58,73 @@ ...@@ -58,77 +58,73 @@
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="生产工单" prop="workorderCode"> <u-form-item label="生产工单" prop="workorderCode">
{{form.workorderCode}} {{form.workorderCode}}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="生产任务" prop="taskCode"> <u-form-item label="生产任务" prop="taskCode">
{{form.taskCode}} {{form.taskCode}}
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<u-row> <u-row>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="产品编码" prop="sapItemCode"> <u-form-item label="产品编码" prop="sapItemCode">
{{form.sapItemCode}} {{form.sapItemCode}}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="产品名称" prop="itemName"> <u-form-item label="产品名称" prop="itemName">
{{form.itemName}} {{form.itemName}}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="单位" prop="unitOfMeasure"> <u-form-item label="单位" prop="unitOfMeasure">
{{form.unitOfMeasure}} {{form.unitOfMeasure}}
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> <u-col :span="6">
<u-row>
<u-col :span="24">
<u-form-item label="规格型号" prop="specification"> <u-form-item label="规格型号" prop="specification">
{{form.specification}} {{form.specification}}
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<u-row> <u-row>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="报工数量" prop="quantityFeedback"> <u-form-item label="报工数量" prop="quantityFeedback">
<u-input disabled v-model="form.quantityFeedback" /> <u-input disabled v-model="form.quantityFeedback" :input-width="190" />
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="良品报工" prop="quantityQualify"> <u-form-item label="良品报工" prop="quantityQualify">
<u-number-box :min="0" @change="handleQuantityChanged" v-model="form.quantityQualify" :long-press="false" placeholder="请输入良品报工" /> <u-number-box :min="0" @change="handleQuantityChanged" :input-width="190" v-model="form.quantityQualify" :long-press="false" placeholder="请输入良品报工" />
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="不良品报工" prop="quantityUnqualify"> <u-form-item label="不良品报工" prop="quantityUnqualify">
<u-number-box :min="0" @change="handleQuantityChanged" v-model="form.quantityUnqualify" :long-press="false" placeholder="请输入不良品报工" /> <u-number-box :min="0" @change="handleQuantityChanged" :input-width="190" v-model="form.quantityUnqualify" :long-press="false" placeholder="请输入不良品报工" />
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> <u-col :span="6">
<u-row>
<u-col :span="4">
<u-form-item label="加工工时" prop="machineTime"> <u-form-item label="加工工时" prop="machineTime">
<u-number-box :min="0" v-model="form.machineTime" placeholder="请输入加工工时" :long-press="false" /> <u-number-box :min="0" v-model="form.machineTime" :input-width="190" placeholder="请输入加工工时" :long-press="false" />
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<u-row> <u-row>
<u-col :span="3"> <u-col :span="6">
<u-form-item label="报工人" prop="nickName"> <u-form-item label="报工人" prop="nickName">
{{form.nickName}} {{form.nickName}}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="5"> <u-col :span="6">
<u-form-item label="报工时间" prop="feedbackTime"> <u-form-item label="报工时间" prop="feedbackTime">
{{form.feedbackTime}} {{form.feedbackTime}}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="6">
<u-form-item label="审核人" prop="recordNick"> <u-form-item label="审核人" prop="recordNick">
{{form.recordNick}} {{form.recordNick}}
</u-form-item> </u-form-item>
...@@ -264,9 +260,6 @@ export default { ...@@ -264,9 +260,6 @@ export default {
const recordId = row.recordId const recordId = row.recordId
this.$u.api.getFeedback(recordId).then(response => { this.$u.api.getFeedback(recordId).then(response => {
this.form = response.data; this.form = response.data;
if(dayjs(response.data.feedbackTime, 'YYYY-MM-DD', true).isValid()){
this.form.feedbackTime = response.data.feedbackTime + ' 00:00:00'
}
this.open = true; this.open = true;
this.title = "修改生产报工记录"; this.title = "修改生产报工记录";
this.optType = "edit"; this.optType = "edit";
...@@ -278,9 +271,6 @@ export default { ...@@ -278,9 +271,6 @@ export default {
const recordId = row.recordId; const recordId = row.recordId;
this.$u.api.getFeedback(recordId).then(response => { this.$u.api.getFeedback(recordId).then(response => {
this.form = response.data; this.form = response.data;
if(dayjs(response.data.feedbackTime, 'YYYY-MM-DD', true).isValid()){
this.form.feedbackTime = response.data.feedbackTime + ' 00:00:00'
}
this.open = true; this.open = true;
this.title = "查看生产报工单信息"; this.title = "查看生产报工单信息";
this.optType = "view"; this.optType = "view";
...@@ -333,6 +323,8 @@ export default { ...@@ -333,6 +323,8 @@ export default {
} }
</script> </script>
<style> <style lang="scss" scoped>
/deep/ .editzbtable .item-td {
word-break: break-all;
}
</style> </style>
\ No newline at end of file
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-form-item label="不良品数量:" prop="quantityUnqualify"> <u-form-item label="不良品数量:" prop="quantityUnqualify">
<u-number-box :min="0" v-model="feedback.quantityUnqualify" :long-press="false"></u-number-box> <u-number-box :min="0" v-model="feedback.quantityUnqualify" :long-press="false" :input-width="140"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
...@@ -179,12 +179,12 @@ ...@@ -179,12 +179,12 @@
<u-row> <u-row>
<u-col span="3"> <u-col span="3">
<u-form-item label="包装数量:" prop="packNum"> <u-form-item label="包装数量:" prop="packNum">
<u-number-box :min="0" v-model="feedback.packNum" :long-press="false"></u-number-box> <u-number-box :min="0" v-model="feedback.packNum" :long-press="false" :input-width="140"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="3"> <u-col span="3">
<u-form-item label="装箱数量:" prop="encasementNum"> <u-form-item label="装箱数量:" prop="encasementNum">
<u-number-box :min="0" v-model="feedback.encasementNum" :long-press="false"></u-number-box> <u-number-box :min="0" v-model="feedback.encasementNum" :long-press="false" :input-width="140"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
...@@ -307,8 +307,8 @@ ...@@ -307,8 +307,8 @@
</u-row> </u-row>
<u-row> <u-row>
<u-col span="6"> <u-col span="6">
<u-form-item label="报工总数量:" prop="quantity"> <u-form-item :label="feedback.taskType&&feedback.taskType===3 ? '委外数量:' : '报工总数量:'" prop="quantity">
{{ feedback.quantityQualify + feedback.quantityUnqualify }} {{ feedback.taskType&&feedback.taskType===3 ? (feedback.quantityQualify) : (feedback.quantityQualify + feedback.quantityUnqualify) }}
<!-- {{ computedQuantityV2 }} --> <!-- {{ computedQuantityV2 }} -->
</u-form-item> </u-form-item>
...@@ -329,7 +329,8 @@ ...@@ -329,7 +329,8 @@
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<u-form-item label="生产工单:" prop="workorderId"> <u-form-item label="生产工单:" prop="workorderId">
<uni-data-select v-model="feedback.workorderId" :localdata="feedback.workorderOption" <view v-if="feedback.taskType&&feedback.taskType===3">{{feedback.workorderId}}</view>
<uni-data-select v-model="feedback.workorderId" v-else :localdata="feedback.workorderOption"
@change="workorderSelect($event, i)"></uni-data-select> @change="workorderSelect($event, i)"></uni-data-select>
</u-form-item> </u-form-item>
</u-col> </u-col>
...@@ -365,13 +366,13 @@ ...@@ -365,13 +366,13 @@
v-model="feedback.quantityQualify" :long-press="false"></u-number-box> v-model="feedback.quantityQualify" :long-press="false"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6" v-if="!feedback.taskType||feedback.taskType!==3">
<u-form-item label="不良品数量:" prop="quantityUnqualify"> <u-form-item label="不良品数量:" prop="quantityUnqualify">
<u-number-box :min="0" @change="quantityChanged()" :max="99999999999999999999999999999999999999999" :input-width="190" <u-number-box :min="0" @change="quantityChanged()" :max="99999999999999999999999999999999999999999" :input-width="190"
v-model="feedback.quantityUnqualify" :long-press="false"></u-number-box> v-model="feedback.quantityUnqualify" :long-press="false"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6" v-if="!feedback.taskType||feedback.taskType!==3">
<u-form-item class="column-type" label-width="100px" label="合格数量(副):" prop="feedbackQuantityFu"> <u-form-item class="column-type" label-width="100px" label="合格数量(副):" prop="feedbackQuantityFu">
<view class="button-type2"> <view class="button-type2">
<u-number-box :min="0" key="numberBox1" :max="99999999999999999999999999999999999999999" :input-width="190" <u-number-box :min="0" key="numberBox1" :max="99999999999999999999999999999999999999999" :input-width="190"
...@@ -381,7 +382,7 @@ ...@@ -381,7 +382,7 @@
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6" v-if="!feedback.taskType||feedback.taskType!==3">
<u-form-item class="column-type" label-width="100px" label="不良品数量(副):" prop="feedbackUnQuantityFu"> <u-form-item class="column-type" label-width="100px" label="不良品数量(副):" prop="feedbackUnQuantityFu">
<u-number-box :min="0" align="right" key="numberBox2" :max="99999999999999999999999999999999999999999" :input-width="190" <u-number-box :min="0" align="right" key="numberBox2" :max="99999999999999999999999999999999999999999" :input-width="190"
@change="()=>quantityChangedV3(feedback, feedbackQuantityFu, feedbackUnQuantityFu)" @change="()=>quantityChangedV3(feedback, feedbackQuantityFu, feedbackUnQuantityFu)"
...@@ -394,16 +395,24 @@ ...@@ -394,16 +395,24 @@
v-model="feedback.feedbackTime" /> v-model="feedback.feedbackTime" />
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<u-form-item label="打印:" prop="whether"> <u-form-item label="是否关单:" prop="whether" v-if="feedback.taskType&&feedback.taskType===3">
<view class="uni-list-item__extra"> <view class="uni-list-item__extra">
<u-radio-group v-model="feedback.whether"> <u-radio-group v-model="feedback.whether">
<u-radio :name="1"></u-radio> <u-radio :name="1"></u-radio>
<u-radio :name="0"></u-radio> <u-radio :name="0"></u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
</u-form-item> </u-form-item>
</u-col> <u-form-item label="打印:" prop="whether" v-else>
<view class="uni-list-item__extra">
<u-radio-group v-model="feedback.whether">
<u-radio :name="1"></u-radio>
<u-radio :name="0"></u-radio>
</u-radio-group>
</view>
</u-form-item>
</u-col>
</u-row> </u-row>
<!-- <u-row> --> <!-- <u-row> -->
...@@ -2184,7 +2193,6 @@ export default { ...@@ -2184,7 +2193,6 @@ export default {
}, },
doFeedback() { doFeedback() {
// this.reset(); // this.reset();
console.log(this.dict.type, 'this.dicts.type');
this.feedbackUnQuantityFu = 0; this.feedbackUnQuantityFu = 0;
this.feedbackQuantityFu = 0; this.feedbackQuantityFu = 0;
...@@ -2277,6 +2285,7 @@ export default { ...@@ -2277,6 +2285,7 @@ export default {
slot: 'peration' slot: 'peration'
} }
], ],
taskType: 3,
listTabPro: [], listTabPro: [],
tableOrderData: [], tableOrderData: [],
tableDirectiveData: [], tableDirectiveData: [],
...@@ -2285,6 +2294,10 @@ export default { ...@@ -2285,6 +2294,10 @@ export default {
encasementNum: 0, encasementNum: 0,
mergePack: 0 mergePack: 0
}; };
if(feedback.taskType && feedback.taskType === 3) {
feedback.quantityQualify = item.quantity - item.quantityQualify - item.quantityUnqualify
feedback.quantityUnqualify = item.quantityUnqualify
}
this.getWorkorderWithSizeAndDirective(feedback, index); this.getWorkorderWithSizeAndDirective(feedback, index);
this.feedbackForms.push(feedback); this.feedbackForms.push(feedback);
}); });
......
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