作者 张晓杰

Merge branch 'dev' of http://39.105.222.208:1024/leihd/factory-web into dev

# Conflicts:
#	dist.zip
不能预览此文件类型
@@ -80,6 +80,14 @@ export function selectUp(url,parameter){ @@ -80,6 +80,14 @@ export function selectUp(url,parameter){
80 params: parameter 80 params: parameter
81 }) 81 })
82 } 82 }
  83 +//根据产品类型查询对应工序
  84 +export function gongxuList(url,parameter){
  85 + return axios({
  86 + url:url,
  87 + method:'get',
  88 + params:parameter
  89 + })
  90 +}
83 //新增派工 91 //新增派工
84 export function addPg(url,parameter){ 92 export function addPg(url,parameter){
85 return axios({ 93 return axios({
@@ -96,6 +104,14 @@ export function queryBynumber(url,parameter){ @@ -96,6 +104,14 @@ export function queryBynumber(url,parameter){
96 params:parameter 104 params:parameter
97 }) 105 })
98 } 106 }
  107 +//生产计划验收
  108 +export function yanshouList(url,parameter){
  109 + return axios({
  110 + url:url,
  111 + method:'get',
  112 + params:parameter
  113 + })
  114 +}
99 //工序查询 115 //工序查询
100 export function querygx(url,parameter){ 116 export function querygx(url,parameter){
101 return axios({ 117 return axios({
@@ -261,12 +261,20 @@ export const JeecgListMixin = { @@ -261,12 +261,20 @@ export const JeecgListMixin = {
261 this.$refs.modalForm.title = "新增"; 261 this.$refs.modalForm.title = "新增";
262 this.$refs.modalForm.disableSubmit = false; 262 this.$refs.modalForm.disableSubmit = false;
263 }, 263 },
  264 +
  265 +
264 //新增派工 266 //新增派工
265 handleAddpg:function(record){ 267 handleAddpg:function(record){
266 this.$refs.pgModalForm.add(record) 268 this.$refs.pgModalForm.add(record)
267 this.$refs.pgModalForm.title="派工" 269 this.$refs.pgModalForm.title="派工"
268 this.$refs.pgModalForm.disableSubmit = false; 270 this.$refs.pgModalForm.disableSubmit = false;
269 }, 271 },
  272 + //验收
  273 + handleYans:function(record){
  274 + this.$refs.yansModalForm.yanshouList(record);
  275 + this.$refs.yansModalForm.title="验收";
  276 + this.$refs.yansModalForm.disableSubmit=false;
  277 + },
270 handleTableChange(pagination, filters, sorter) { 278 handleTableChange(pagination, filters, sorter) {
271 //分页、排序、筛选变化时触发 279 //分页、排序、筛选变化时触发
272 //TODO 筛选 280 //TODO 筛选
@@ -298,10 +306,10 @@ export const JeecgListMixin = { @@ -298,10 +306,10 @@ export const JeecgListMixin = {
298 }, 306 },
299 // 生产计划查看 307 // 生产计划查看
300 handleDetail2: function (record) { 308 handleDetail2: function (record) {
301 - console.log("生产计划查看:",record.orderNumber) 309 + console.log("生产计划查看:",record.orderId)
302 this.$refs.modalForm.edit(record); 310 this.$refs.modalForm.edit(record);
303 - this.$refs.modalForm.queryBynumber(record.orderNumber);  
304 - this.$refs.modalForm.querygx(record.orderNumber,record.productType) 311 + this.$refs.modalForm.queryBynumber(record.orderId);
  312 + this.$refs.modalForm.querygx(record.orderId,record.productType)
305 this.$refs.modalForm.title = "生产订单>详情"; 313 this.$refs.modalForm.title = "生产订单>详情";
306 this.$refs.modalForm.disableSubmit = true; 314 this.$refs.modalForm.disableSubmit = true;
307 }, 315 },
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <a-row :gutter="24"> 6 <a-row :gutter="24">
7 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
8 <a-form-item label="订货单位"> 8 <a-form-item label="订货单位">
9 - <j-input placeholder="请输入订货单位" v-model="queryParam.danwei"></j-input> 9 + <j-input placeholder="请输入订货单位" v-model="queryParam.orderCompany"></j-input>
10 </a-form-item> 10 </a-form-item>
11 </a-col> 11 </a-col>
12 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 12 <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <a-form-item label="产品类型"> 18 <a-form-item label="产品类型">
19 <!-- <j-input placeholder="请选择产品类型" v-model="queryParam.productType"></j-input> --> 19 <!-- <j-input placeholder="请选择产品类型" v-model="queryParam.productType"></j-input> -->
20 <a-select size="small" v-model="queryParam.productType" placeholder="请选择产品类型" allowClear> 20 <a-select size="small" v-model="queryParam.productType" placeholder="请选择产品类型" allowClear>
21 - <a-select-option v-for="(item,index) in options" :key="index" :value="item.productTypeName">{{ item.productTypeName }}</a-select-option> 21 + <a-select-option v-for="(item,index) in options" :key="index" :value="item.productTypeId">{{ item.productTypeName }}</a-select-option>
22 </a-select> 22 </a-select>
23 </a-form-item> 23 </a-form-item>
24 </a-col> 24 </a-col>
@@ -108,15 +108,16 @@ @@ -108,15 +108,16 @@
108 <span slot="action" slot-scope="text, record"> 108 <span slot="action" slot-scope="text, record">
109 <a @click="handleDetail2(record)">查看</a> 109 <a @click="handleDetail2(record)">查看</a>
110 <a-divider type="vertical" /> 110 <a-divider type="vertical" />
111 - <a @click="handleAddpg(record)">派工</a> 111 + <a @click="handleAddpg(record)" :disabled="record.totalWorkingHours - record.dispatchedWorkingHours === 0">派工</a>
112 <a-divider type="vertical" /> 112 <a-divider type="vertical" />
113 - <a @click="handleEdit(record)">验收</a> 113 + <a @click="handleYans(record)">验收</a>
114 </span> 114 </span>
115 </a-table> 115 </a-table>
116 </div> 116 </div>
117 117
118 <tbl-production-plan-modal ref="modalForm" @ok="modalFormOk"></tbl-production-plan-modal> 118 <tbl-production-plan-modal ref="modalForm" @ok="modalFormOk"></tbl-production-plan-modal>
119 <TblProductionAddpg ref="pgModalForm" @ok="modalFormOk"></TblProductionAddpg> 119 <TblProductionAddpg ref="pgModalForm" @ok="modalFormOk"></TblProductionAddpg>
  120 + <TblProductionYans ref="yansModalForm" @ok="modalFormOk"></TblProductionYans>
120 </a-card> 121 </a-card>
121 </template> 122 </template>
122 123
@@ -126,12 +127,13 @@ import { mixinDevice } from '@/utils/mixin' @@ -126,12 +127,13 @@ import { mixinDevice } from '@/utils/mixin'
126 import { JeecgListMixin } from '@/mixins/JeecgListMixin' 127 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
127 import TblProductionPlanModal from './planModules/TblProductionPlanModal' 128 import TblProductionPlanModal from './planModules/TblProductionPlanModal'
128 import TblProductionAddpg from './planModules/TblProductionAddpg.vue' 129 import TblProductionAddpg from './planModules/TblProductionAddpg.vue'
  130 +import TblProductionYans from './planModules/TblProductionYans.vue'
129 import {listProductType} from '@/api/ProductTpye' 131 import {listProductType} from '@/api/ProductTpye'
130 export default { 132 export default {
131 name: 'TblProductionPlanList', 133 name: 'TblProductionPlanList',
132 mixins: [JeecgListMixin, mixinDevice], 134 mixins: [JeecgListMixin, mixinDevice],
133 components: { 135 components: {
134 - TblProductionPlanModal,TblProductionAddpg 136 + TblProductionPlanModal,TblProductionAddpg,TblProductionYans
135 }, 137 },
136 data() { 138 data() {
137 return { 139 return {
@@ -152,12 +154,12 @@ export default { @@ -152,12 +154,12 @@ export default {
152 { 154 {
153 title: '订单号', 155 title: '订单号',
154 align: 'center', 156 align: 'center',
155 - dataIndex: 'orderNumber', 157 + dataIndex: 'orderId',
156 }, 158 },
157 { 159 {
158 title: '订货单位', 160 title: '订货单位',
159 align: 'center', 161 align: 'center',
160 - dataIndex: 'danwei', 162 + dataIndex: 'orderCompany',
161 }, 163 },
162 { 164 {
163 title: '工作令', 165 title: '工作令',
@@ -192,7 +194,7 @@ export default { @@ -192,7 +194,7 @@ export default {
192 { 194 {
193 title: '任务下达时间', 195 title: '任务下达时间',
194 align: 'center', 196 align: 'center',
195 - dataIndex: 'workTime', 197 + dataIndex: 'orderDate',
196 customRender: function (text) { 198 customRender: function (text) {
197 return !text ? '' : text.length > 10 ? text.substr(0, 10) : text 199 return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
198 }, 200 },
@@ -200,7 +202,7 @@ export default { @@ -200,7 +202,7 @@ export default {
200 { 202 {
201 title: '派工时间', 203 title: '派工时间',
202 align: 'center', 204 align: 'center',
203 - dataIndex: 'dispatchTime', 205 + dataIndex: 'dispatchDate',
204 customRender: function (text) { 206 customRender: function (text) {
205 return !text ? '' : text.length > 10 ? text.substr(0, 10) : text 207 return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
206 }, 208 },
@@ -208,7 +210,7 @@ export default { @@ -208,7 +210,7 @@ export default {
208 { 210 {
209 title: '交货时间', 211 title: '交货时间',
210 align: 'center', 212 align: 'center',
211 - dataIndex: 'deliveryTime', 213 + dataIndex: 'deliveryDate',
212 customRender: function (text) { 214 customRender: function (text) {
213 return !text ? '' : text.length > 10 ? text.substr(0, 10) : text 215 return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
214 }, 216 },
@@ -216,17 +218,17 @@ export default { @@ -216,17 +218,17 @@ export default {
216 { 218 {
217 title: '数量(套)', 219 title: '数量(套)',
218 align: 'center', 220 align: 'center',
219 - dataIndex: 'num', 221 + dataIndex: 'quantity',
220 }, 222 },
221 { 223 {
222 title: '总工时', 224 title: '总工时',
223 align: 'center', 225 align: 'center',
224 - dataIndex: 'totalWork', 226 + dataIndex: 'totalWorkingHours',
225 }, 227 },
226 { 228 {
227 title: '已派发工时', 229 title: '已派发工时',
228 align: 'center', 230 align: 'center',
229 - dataIndex: 'pai', 231 + dataIndex: 'dispatchedWorkingHours',
230 }, 232 },
231 { 233 {
232 title: '操作', 234 title: '操作',
@@ -5,69 +5,79 @@ @@ -5,69 +5,79 @@
5 :visible="visible" 5 :visible="visible"
6 switchFullscreen 6 switchFullscreen
7 @ok="handleOk" 7 @ok="handleOk"
8 - :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" 8 + :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
9 @cancel="handleCancel" 9 @cancel="handleCancel"
10 - cancelText="关闭">  
11 - <TblProductionAddpgForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></TblProductionAddpgForm> 10 + cancelText="关闭"
  11 + >
  12 + <TblProductionAddpgForm
  13 + ref="realForm"
  14 + @ok="submitCallback"
  15 + :disabled="disableSubmit"
  16 + normal
  17 + ></TblProductionAddpgForm>
12 </j-modal> 18 </j-modal>
13 </template> 19 </template>
14 20
15 <script> 21 <script>
  22 +import TblProductionAddpgForm from './TblProductionAddpgForm'
16 23
17 - import TblProductionAddpgForm from './TblProductionAddpgForm'  
18 -  
19 - export default { 24 +export default {
20 name: 'TblProductionAddpg', 25 name: 'TblProductionAddpg',
21 components: { 26 components: {
22 - TblProductionAddpgForm 27 + TblProductionAddpgForm,
23 }, 28 },
24 - data () { 29 + data() {
25 return { 30 return {
26 - title:"操作",  
27 - width:670, 31 + title: '操作',
  32 + width: 670,
28 visible: false, 33 visible: false,
29 - disableSubmit: false 34 + disableSubmit: false,
30 } 35 }
31 }, 36 },
32 methods: { 37 methods: {
33 - add (record) {  
34 - this.visible=true  
35 - this.$nextTick(()=>{  
36 - this.$refs.realForm.add(record); 38 + add(record) {
  39 +
  40 + if (record.totalWorkingHours - record.dispatchedWorkingHours === 0) {
  41 + this.$message.error('工时已派完')
  42 + } else {
  43 + this.visible = true
  44 + this.$nextTick(() => {
  45 + this.$refs.realForm.add(record)
37 }) 46 })
  47 + }
38 }, 48 },
39 - edit (record) {  
40 - this.visible=true  
41 - this.$nextTick(()=>{  
42 - this.$refs.realForm.edit(record);  
43 - }); 49 + edit(record) {
  50 + this.visible = true
  51 + this.$nextTick(() => {
  52 + this.$refs.realForm.edit(record)
  53 + })
44 }, 54 },
45 - close () {  
46 - this.$emit('close');  
47 - this.visible = false; 55 + close() {
  56 + this.$emit('close')
  57 + this.visible = false
48 }, 58 },
49 - submitCallback(){  
50 - this.$emit('ok');  
51 - this.visible = false; 59 + submitCallback() {
  60 + this.$emit('ok')
  61 + this.visible = false
52 }, 62 },
53 - handleOk () {  
54 - this.$refs.realForm.submitForm(); 63 + handleOk() {
  64 + this.$refs.realForm.submitForm()
55 }, 65 },
56 - handleCancel () { 66 + handleCancel() {
57 this.close() 67 this.close()
58 - }  
59 - }  
60 - } 68 + },
  69 + },
  70 +}
61 </script> 71 </script>
62 72
63 <style lang="less" scoped> 73 <style lang="less" scoped>
64 /** Button按钮间距 */ 74 /** Button按钮间距 */
65 - .ant-btn { 75 +.ant-btn {
66 margin-left: 30px; 76 margin-left: 30px;
67 margin-bottom: 30px; 77 margin-bottom: 30px;
68 float: right; 78 float: right;
69 - }  
70 - .drawer-footer{ 79 +}
  80 +.drawer-footer {
71 position: absolute; 81 position: absolute;
72 bottom: -8px; 82 bottom: -8px;
73 width: 100%; 83 width: 100%;
@@ -77,5 +87,5 @@ @@ -77,5 +87,5 @@
77 left: 0; 87 left: 0;
78 background: #fff; 88 background: #fff;
79 border-radius: 0 0 2px 2px; 89 border-radius: 0 0 2px 2px;
80 - } 90 +}
81 </style> 91 </style>
@@ -2,862 +2,54 @@ @@ -2,862 +2,54 @@
2 <a-spin :spinning="confirmLoading"> 2 <a-spin :spinning="confirmLoading">
3 <j-form-container :disabled="formDisabled"> 3 <j-form-container :disabled="formDisabled">
4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> 4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
5 - <!-- 接地表 -->  
6 - <table style="width: 100%; text-align: center" border v-if="productType === 'JD'"> 5 + <!-- <table style="width: 100%; text-align: center" border>
7 <tr> 6 <tr>
8 <th style="width: 200px">工序</th> 7 <th style="width: 200px">工序</th>
9 <th style="width: 200px">承接人</th> 8 <th style="width: 200px">承接人</th>
10 <th style="width: 200px">工时</th> 9 <th style="width: 200px">工时</th>
11 </tr> 10 </tr>
12 - <!-- 接地激光 -->  
13 - <tr>  
14 - <td>  
15 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
16 - <a-input  
17 - v-model="model.jiedijig"  
18 - style="border: none; background-color: transparent; text-align: center"  
19 - :readOnly="true"  
20 - ></a-input>  
21 - </a-form-model-item>  
22 - </td>  
23 - <td>  
24 - <a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">  
25 - <a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>  
26 - <a-select-option v-for="(item, index) in options" :key="index" :value="item.userName">{{  
27 - item.userName  
28 - }}</a-select-option>  
29 - </a-select>  
30 - </a-form-model-item>  
31 - </td>  
32 - <td>  
33 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
34 - <a-input v-model="model.workHoursjig" style="text-align: center"></a-input>  
35 - </a-form-model-item>  
36 - </td>  
37 - </tr>  
38 - <!-- 接地锯床 -->  
39 - <tr>  
40 - <td>  
41 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
42 - <a-input  
43 - v-model="model.jiedijuc"  
44 - style="border: none; background-color: transparent; text-align: center"  
45 - :readOnly="true"  
46 - ></a-input>  
47 - </a-form-model-item>  
48 - </td>  
49 - <td>  
50 - <a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">  
51 - <a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>  
52 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
53 - item.userName  
54 - }}</a-select-option>  
55 - </a-select>  
56 - </a-form-model-item>  
57 - </td>  
58 - <td>  
59 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
60 - <a-input v-model="model.workHoursjuc" style="text-align: center"></a-input>  
61 - </a-form-model-item>  
62 - </td>  
63 - </tr>  
64 - <!-- 接地钳工 -->  
65 - <tr>  
66 - <td>  
67 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
68 - <a-input  
69 - v-model="model.jiediqg"  
70 - style="border: none; background-color: transparent; text-align: center"  
71 - :readOnly="true"  
72 - ></a-input>  
73 - </a-form-model-item>  
74 - </td>  
75 - <td>  
76 - <a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">  
77 - <a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>  
78 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
79 - item.userName  
80 - }}</a-select-option>  
81 - </a-select>  
82 - </a-form-model-item>  
83 - </td>  
84 - <td>  
85 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
86 - <a-input v-model="model.workHoursqg" style="text-align: center"></a-input>  
87 - </a-form-model-item>  
88 - </td>  
89 - </tr>  
90 - <!-- 接地焊工 -->  
91 - <tr>  
92 - <td>  
93 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
94 - <a-input  
95 - v-model="model.jiedihg"  
96 - style="border: none; background-color: transparent; text-align: center"  
97 - :readOnly="true"  
98 - ></a-input>  
99 - </a-form-model-item>  
100 - </td>  
101 - <td>  
102 - <a-form-model-item prop="undertakerhg" style="margin-bottom: 0px">  
103 - <a-select size="small" v-model="model.undertakerhg" placeholder="请选择承接人" allowClear>  
104 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
105 - item.userName  
106 - }}</a-select-option>  
107 - </a-select>  
108 - </a-form-model-item>  
109 - </td>  
110 - <td>  
111 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
112 - <a-input v-model="model.workHourshg" style="text-align: center"></a-input>  
113 - </a-form-model-item>  
114 - </td>  
115 - </tr>  
116 - </table>  
117 -  
118 - <!-- 线槽表 -->  
119 - <table style="width: 100%; text-align: center" border v-if="productType === 'XC'">  
120 - <tr>  
121 - <th style="width: 200px">工序</th>  
122 - <th style="width: 200px">承接人</th>  
123 - <th style="width: 200px">工时</th>  
124 - </tr>  
125 - <!-- 线槽激光 -->  
126 - <tr>  
127 - <td>  
128 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
129 - <a-input  
130 - v-model="model.xiancjig"  
131 - style="border: none; background-color: transparent; text-align: center"  
132 - :readOnly="true"  
133 - ></a-input>  
134 - </a-form-model-item>  
135 - </td>  
136 - <td>  
137 - <a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">  
138 - <a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>  
139 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
140 - item.userName  
141 - }}</a-select-option>  
142 - </a-select>  
143 - </a-form-model-item>  
144 - </td>  
145 - <td>  
146 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
147 - <a-input v-model="model.workHoursjig" style="text-align: center"></a-input>  
148 - </a-form-model-item>  
149 - </td>  
150 - </tr>  
151 - <!-- 线槽锯床 -->  
152 - <tr>  
153 - <td>  
154 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
155 - <a-input  
156 - v-model="model.xiancjuc"  
157 - style="border: none; background-color: transparent; text-align: center"  
158 - :readOnly="true"  
159 - ></a-input>  
160 - </a-form-model-item>  
161 - </td>  
162 - <td>  
163 - <a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">  
164 - <a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>  
165 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
166 - item.userName  
167 - }}</a-select-option>  
168 - </a-select>  
169 - </a-form-model-item>  
170 - </td>  
171 - <td>  
172 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
173 - <a-input v-model="model.workHoursjuc" style="text-align: center"></a-input>  
174 - </a-form-model-item>  
175 - </td>  
176 - </tr>  
177 - <!-- 线槽钳工 -->  
178 - <tr>  
179 - <td>  
180 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
181 - <a-input  
182 - v-model="model.xiancqg"  
183 - style="border: none; background-color: transparent; text-align: center"  
184 - :readOnly="true"  
185 - ></a-input>  
186 - </a-form-model-item>  
187 - </td>  
188 - <td>  
189 - <a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">  
190 - <a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>  
191 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
192 - item.userName  
193 - }}</a-select-option>  
194 - </a-select>  
195 - </a-form-model-item>  
196 - </td>  
197 - <td>  
198 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
199 - <a-input v-model="model.workHoursqg" style="text-align: center"></a-input>  
200 - </a-form-model-item>  
201 - </td>  
202 - </tr>  
203 - <!-- 线槽焊工 -->  
204 - <tr>  
205 - <td>  
206 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
207 - <a-input  
208 - v-model="model.xianchg"  
209 - style="border: none; background-color: transparent; text-align: center"  
210 - :readOnly="true"  
211 - ></a-input>  
212 - </a-form-model-item>  
213 - </td>  
214 - <td>  
215 - <a-form-model-item prop="undertakerhg" style="margin-bottom: 0px">  
216 - <a-select size="small" v-model="model.undertakerhg" placeholder="请选择承接人" allowClear>  
217 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
218 - item.userName  
219 - }}</a-select-option>  
220 - </a-select>  
221 - </a-form-model-item>  
222 - </td>  
223 - <td>  
224 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
225 - <a-input v-model="model.workHourshg" style="text-align: center"></a-input>  
226 - </a-form-model-item>  
227 - </td>  
228 - </tr>  
229 - </table>  
230 -  
231 - <!-- 卡子表 -->  
232 - <table style="width: 100%; text-align: center" border v-if="productType === 'QZ'">  
233 - <tr>  
234 - <th style="width: 200px">工序</th>  
235 - <th style="width: 200px">承接人</th>  
236 - <th style="width: 200px">工时</th>  
237 - </tr>  
238 - <!-- 卡子激光 -->  
239 - <tr>  
240 - <td>  
241 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
242 - <a-input  
243 - v-model="model.qzjig"  
244 - style="border: none; background-color: transparent; text-align: center"  
245 - :readOnly="true"  
246 - ></a-input>  
247 - </a-form-model-item>  
248 - </td>  
249 - <a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">  
250 - <a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>  
251 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
252 - item.userName  
253 - }}</a-select-option>  
254 - </a-select>  
255 - </a-form-model-item>  
256 - <td>  
257 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
258 - <a-input v-model="model.workHoursjig" style="text-align: center"></a-input>  
259 - </a-form-model-item>  
260 - </td>  
261 - </tr>  
262 - <!-- 卡子锯床 -->  
263 - <tr>  
264 - <td>  
265 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
266 - <a-input  
267 - v-model="model.qzjuc"  
268 - style="border: none; background-color: transparent; text-align: center"  
269 - :readOnly="true"  
270 - ></a-input>  
271 - </a-form-model-item>  
272 - </td>  
273 - <td>  
274 - <a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">  
275 - <a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>  
276 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
277 - item.userName  
278 - }}</a-select-option>  
279 - </a-select>  
280 - </a-form-model-item>  
281 - </td>  
282 - <td>  
283 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
284 - <a-input v-model="model.workHoursjuc" style="text-align: center"></a-input>  
285 - </a-form-model-item>  
286 - </td>  
287 - </tr>  
288 - <!-- 卡子钳工 -->  
289 - <tr>  
290 - <td>  
291 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
292 - <a-input  
293 - v-model="model.qzqg"  
294 - style="border: none; background-color: transparent; text-align: center"  
295 - :readOnly="true"  
296 - ></a-input>  
297 - </a-form-model-item>  
298 - </td>  
299 - <td>  
300 - <a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">  
301 - <a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>  
302 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
303 - item.userName  
304 - }}</a-select-option>  
305 - </a-select>  
306 - </a-form-model-item>  
307 - </td>  
308 - <td>  
309 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
310 - <a-input v-model="model.workHoursqg" style="text-align: center"></a-input>  
311 - </a-form-model-item>  
312 - </td>  
313 - </tr>  
314 - <!-- 卡子焊工 -->  
315 - <tr>  
316 - <td>  
317 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
318 - <a-input  
319 - v-model="model.qzhg"  
320 - style="border: none; background-color: transparent; text-align: center"  
321 - :readOnly="true"  
322 - ></a-input>  
323 - </a-form-model-item>  
324 - </td>  
325 - <a-form-model-item prop="undertakerhg" style="margin-bottom: 0px">  
326 - <a-select size="small" v-model="model.undertakerhg" placeholder="请选择承接人" allowClear>  
327 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
328 - item.userName  
329 - }}</a-select-option>  
330 - </a-select>  
331 - </a-form-model-item>  
332 - <td>  
333 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
334 - <a-input v-model="model.workHourshg" style="text-align: center"></a-input>  
335 - </a-form-model-item>  
336 - </td>  
337 - </tr>  
338 - </table>  
339 -  
340 - <!-- 柜、箱、盒表 -->  
341 - <table style="width: 100%; text-align: center" border v-if="productType === 'GX'">  
342 - <tr>  
343 - <th style="width: 200px">工序</th>  
344 - <th style="width: 200px">承接人</th>  
345 - <th style="width: 200px">工时</th>  
346 - </tr>  
347 - <!-- 柜、箱、盒激光 -->  
348 - <tr>  
349 - <td>  
350 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
351 - <a-input  
352 - v-model="model.gxhjig"  
353 - style="border: none; background-color: transparent; text-align: center"  
354 - :readOnly="true"  
355 - ></a-input>  
356 - </a-form-model-item>  
357 - </td>  
358 - <td>  
359 - <a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">  
360 - <a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>  
361 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
362 - item.userName  
363 - }}</a-select-option>  
364 - </a-select>  
365 - </a-form-model-item>  
366 - </td>  
367 - <td>  
368 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
369 - <a-input v-model="model.workHoursjig" style="text-align: center"></a-input>  
370 - </a-form-model-item>  
371 - </td>  
372 - </tr>  
373 - <!-- 柜、箱、盒锯床 -->  
374 - <tr>  
375 - <td>  
376 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
377 - <a-input  
378 - v-model="model.gxhjuc"  
379 - style="border: none; background-color: transparent; text-align: center"  
380 - :readOnly="true"  
381 - ></a-input>  
382 - </a-form-model-item>  
383 - </td>  
384 - <td>  
385 - <a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">  
386 - <a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>  
387 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
388 - item.userName  
389 - }}</a-select-option>  
390 - </a-select>  
391 - </a-form-model-item>  
392 - </td>  
393 - <td>  
394 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
395 - <a-input v-model="model.workHoursjuc" style="text-align: center"></a-input>  
396 - </a-form-model-item>  
397 - </td>  
398 - </tr>  
399 - <!-- 柜、箱、盒折弯+打孔 -->  
400 - <tr>  
401 - <td>  
402 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
403 - <a-input  
404 - v-model="model.gxhqg"  
405 - style="border: none; background-color: transparent; text-align: center"  
406 - :readOnly="true"  
407 - ></a-input>  
408 - </a-form-model-item>  
409 - </td>  
410 - <td>  
411 - <a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">  
412 - <a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>  
413 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
414 - item.userName  
415 - }}</a-select-option>  
416 - </a-select>  
417 - </a-form-model-item>  
418 - </td>  
419 - <td>  
420 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
421 - <a-input v-model="model.workHoursqg" style="text-align: center"></a-input>  
422 - </a-form-model-item>  
423 - </td>  
424 - </tr>  
425 - <!-- 柜、箱、盒铆焊一 -->  
426 - <tr>  
427 - <td>  
428 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
429 - <a-input  
430 - v-model="model.gxhmh1"  
431 - style="border: none; background-color: transparent; text-align: center"  
432 - :readOnly="true"  
433 - ></a-input>  
434 - </a-form-model-item>  
435 - </td>  
436 - <td>  
437 - <a-form-model-item prop="undertakermh1" style="margin-bottom: 0px">  
438 - <a-select size="small" v-model="model.undertakermh1" placeholder="请选择承接人" allowClear>  
439 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
440 - item.userName  
441 - }}</a-select-option>  
442 - </a-select>  
443 - </a-form-model-item>  
444 - </td>  
445 - <td>  
446 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
447 - <a-input v-model="model.workHoursmh1" style="text-align: center"></a-input>  
448 - </a-form-model-item>  
449 - </td>  
450 - </tr>  
451 - <!-- 柜、箱、盒铆焊二 -->  
452 - <tr>  
453 - <td>  
454 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
455 - <a-input  
456 - v-model="model.gxhmh2"  
457 - style="border: none; background-color: transparent; text-align: center"  
458 - :readOnly="true"  
459 - ></a-input>  
460 - </a-form-model-item>  
461 - </td>  
462 - <td>  
463 - <a-form-model-item prop="undertakermh2" style="margin-bottom: 0px">  
464 - <a-select size="small" v-model="model.undertakermh2" placeholder="请选择承接人" allowClear>  
465 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
466 - item.userName  
467 - }}</a-select-option>  
468 - </a-select>  
469 - </a-form-model-item>  
470 - </td>  
471 - <td>  
472 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
473 - <a-input v-model="model.workHoursmh2" style="text-align: center"></a-input>  
474 - </a-form-model-item>  
475 - </td>  
476 - </tr>  
477 - <!-- 柜、箱、盒焊磨 -->  
478 - <tr>  
479 - <td>  
480 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
481 - <a-input  
482 - v-model="model.gxhhm"  
483 - style="border: none; background-color: transparent; text-align: center"  
484 - :readOnly="true"  
485 - ></a-input>  
486 - </a-form-model-item>  
487 - </td>  
488 - <td>  
489 - <a-form-model-item prop="undertakerhm" style="margin-bottom: 0px">  
490 - <a-select size="small" v-model="model.undertakerhm" placeholder="请选择承接人" allowClear>  
491 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
492 - item.userName  
493 - }}</a-select-option>  
494 - </a-select>  
495 - </a-form-model-item>  
496 - </td>  
497 - <td>  
498 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
499 - <a-input v-model="model.workHourshm" style="text-align: center"></a-input>  
500 - </a-form-model-item>  
501 - </td>  
502 - </tr>  
503 - <!-- 柜、箱、盒装配 -->  
504 - <tr>  
505 - <td>  
506 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
507 - <a-input  
508 - v-model="model.gxhzp"  
509 - style="border: none; background-color: transparent; text-align: center"  
510 - :readOnly="true"  
511 - ></a-input>  
512 - </a-form-model-item>  
513 - </td>  
514 - <td>  
515 - <a-form-model-item prop="undertakerzp" style="margin-bottom: 0px">  
516 - <a-select size="small" v-model="model.undertakerzp" placeholder="请选择承接人" allowClear>  
517 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
518 - item.userName  
519 - }}</a-select-option>  
520 - </a-select>  
521 - </a-form-model-item>  
522 - </td>  
523 - <td>  
524 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
525 - <a-input v-model="model.workHourszp" style="text-align: center"></a-input>  
526 - </a-form-model-item>  
527 - </td>  
528 - </tr>  
529 - </table>  
530 -  
531 - <!-- 司机室表 -->  
532 - <table style="width: 100%; text-align: center" border v-if="productType === 'SJ'">  
533 - <tr>  
534 - <th style="width: 200px">工序</th>  
535 - <th style="width: 200px">承接人</th>  
536 - <th style="width: 200px">工时</th>  
537 - </tr>  
538 - <!-- 司机室激光 -->  
539 - <tr>  
540 - <td>  
541 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
542 - <a-input  
543 - v-model="model.sjsjig"  
544 - style="border: none; background-color: transparent; text-align: center"  
545 - :readOnly="true"  
546 - ></a-input>  
547 - </a-form-model-item>  
548 - </td>  
549 - <td>  
550 - <a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">  
551 - <a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>  
552 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
553 - item.userName  
554 - }}</a-select-option>  
555 - </a-select>  
556 - </a-form-model-item>  
557 - </td>  
558 - <td>  
559 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
560 - <a-input v-model="model.workHoursjig" style="text-align: center"></a-input>  
561 - </a-form-model-item>  
562 - </td>  
563 - </tr>  
564 - <!-- 司机室锯床 -->  
565 - <tr>  
566 - <td>  
567 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
568 - <a-input  
569 - v-model="model.sjsjuc"  
570 - style="border: none; background-color: transparent; text-align: center"  
571 - :readOnly="true"  
572 - ></a-input>  
573 - </a-form-model-item>  
574 - </td>  
575 - <td>  
576 - <a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">  
577 - <a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>  
578 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
579 - item.userName  
580 - }}</a-select-option>  
581 - </a-select>  
582 - </a-form-model-item>  
583 - </td>  
584 - <td>  
585 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
586 - <a-input v-model="model.workHoursjuc" style="text-align: center"></a-input>  
587 - </a-form-model-item>  
588 - </td>  
589 - </tr>  
590 - <!-- 司机室折弯+打孔 -->  
591 - <tr>  
592 - <td>  
593 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
594 - <a-input  
595 - v-model="model.sjsqg"  
596 - style="border: none; background-color: transparent; text-align: center"  
597 - :readOnly="true"  
598 - ></a-input>  
599 - </a-form-model-item>  
600 - </td>  
601 - <td>  
602 - <a-form-model-item prop="undertakerqg" style="margin-bottom: 0px">  
603 - <a-select size="small" v-model="model.undertakerqg" placeholder="请选择承接人" allowClear>  
604 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
605 - item.userName  
606 - }}</a-select-option>  
607 - </a-select>  
608 - </a-form-model-item>  
609 - </td>  
610 - <td>  
611 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
612 - <a-input v-model="model.workHoursqg" style="text-align: center"></a-input>  
613 - </a-form-model-item>  
614 - </td>  
615 - </tr>  
616 - <!-- 司机室铆焊一 -->  
617 - <tr>  
618 - <td>  
619 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
620 - <a-input  
621 - v-model="model.sjsmh1"  
622 - style="border: none; background-color: transparent; text-align: center"  
623 - :readOnly="true"  
624 - ></a-input>  
625 - </a-form-model-item>  
626 - </td>  
627 - <td>  
628 - <a-form-model-item prop="undertakermh1" style="margin-bottom: 0px">  
629 - <a-select size="small" v-model="model.undertakermh1" placeholder="请选择承接人" allowClear>  
630 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
631 - item.userName  
632 - }}</a-select-option>  
633 - </a-select>  
634 - </a-form-model-item>  
635 - </td>  
636 - <td>  
637 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
638 - <a-input v-model="model.workHoursmh1" style="text-align: center"></a-input>  
639 - </a-form-model-item>  
640 - </td>  
641 - </tr>  
642 - <!-- 司机室铆焊二 -->  
643 - <tr>  
644 - <td>  
645 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
646 - <a-input  
647 - v-model="model.sjsmh2"  
648 - style="border: none; background-color: transparent; text-align: center"  
649 - :readOnly="true"  
650 - ></a-input>  
651 - </a-form-model-item>  
652 - </td>  
653 - <td>  
654 - <a-form-model-item prop="undertakermh2" style="margin-bottom: 0px">  
655 - <a-select size="small" v-model="model.undertakermh2" placeholder="请选择承接人" allowClear>  
656 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
657 - item.userName  
658 - }}</a-select-option>  
659 - </a-select>  
660 - </a-form-model-item>  
661 - </td>  
662 - <td>  
663 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
664 - <a-input v-model="model.workHoursmh2" style="text-align: center"></a-input>  
665 - </a-form-model-item>  
666 - </td>  
667 - </tr>  
668 - <!-- 司机室焊磨 -->  
669 - <tr>  
670 - <td>  
671 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
672 - <a-input  
673 - v-model="model.sjshm"  
674 - style="border: none; background-color: transparent; text-align: center"  
675 - :readOnly="true"  
676 - ></a-input>  
677 - </a-form-model-item>  
678 - </td>  
679 - <td>  
680 - <a-form-model-item prop="undertakerhm" style="margin-bottom: 0px">  
681 - <a-select size="small" v-model="model.undertakerhm" placeholder="请选择承接人" allowClear>  
682 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
683 - item.userName  
684 - }}</a-select-option>  
685 - </a-select>  
686 - </a-form-model-item>  
687 - </td>  
688 - <td>  
689 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
690 - <a-input v-model="model.workHourshm" style="text-align: center"></a-input>  
691 - </a-form-model-item>  
692 - </td>  
693 - </tr>  
694 - <!-- 司机室装配 -->  
695 - <tr>  
696 - <td>  
697 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
698 - <a-input  
699 - v-model="model.sjszp"  
700 - style="border: none; background-color: transparent; text-align: center"  
701 - :readOnly="true"  
702 - ></a-input>  
703 - </a-form-model-item>  
704 - </td>  
705 - <td>  
706 - <a-form-model-item prop="undertakerzp" style="margin-bottom: 0px">  
707 - <a-select size="small" v-model="model.undertakerzp" placeholder="请选择承接人" allowClear>  
708 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
709 - item.userName  
710 - }}</a-select-option>  
711 - </a-select>  
712 - </a-form-model-item>  
713 - </td>  
714 - <td>  
715 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
716 - <a-input v-model="model.workHourszp" style="text-align: center"></a-input>  
717 - </a-form-model-item>  
718 - </td>  
719 - </tr>  
720 - </table>  
721 -  
722 - <!-- 附属钢表 -->  
723 - <table style="width: 100%; text-align: center" border v-if="productType === 'FS'">  
724 - <tr>  
725 - <th style="width: 200px">工序</th>  
726 - <th style="width: 200px">承接人</th>  
727 - <th style="width: 200px">工时</th>  
728 - </tr>  
729 - <!-- 附属刚激光 -->  
730 - <tr>  
731 - <td>  
732 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
733 - <a-input  
734 - v-model="model.fsgjig"  
735 - style="border: none; background-color: transparent; text-align: center"  
736 - :readOnly="true"  
737 - ></a-input>  
738 - </a-form-model-item>  
739 - </td>  
740 - <td>  
741 - <a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">  
742 - <a-select size="small" v-model="model.undertakerjig" placeholder="请选择承接人" allowClear>  
743 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
744 - item.userName  
745 - }}</a-select-option>  
746 - </a-select>  
747 - </a-form-model-item>  
748 - </td>  
749 - <td>  
750 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
751 - <a-input v-model="model.workHoursjig" style="text-align: center"></a-input>  
752 - </a-form-model-item>  
753 - </td>  
754 - </tr>  
755 - <!-- 附属刚锯床 -->  
756 - <tr> 11 + <tr v-for="(item, index) in res" :key="index">
757 <td> 12 <td>
758 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px"> 13 + <a-form-model-item prop="gongxu" style="margin-bottom: 0px">
759 <a-input 14 <a-input
760 - v-model="model.fsgjuc" 15 + v-model="item.gongxu"
761 style="border: none; background-color: transparent; text-align: center" 16 style="border: none; background-color: transparent; text-align: center"
762 :readOnly="true" 17 :readOnly="true"
763 ></a-input> 18 ></a-input>
764 </a-form-model-item> 19 </a-form-model-item>
765 </td> 20 </td>
766 <td> 21 <td>
767 - <a-form-model-item prop="undertakerjuc" style="margin-bottom: 0px">  
768 - <a-select size="small" v-model="model.undertakerjuc" placeholder="请选择承接人" allowClear>  
769 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
770 - item.userName  
771 - }}</a-select-option> 22 + <a-form-model-item prop="undertakerjig" style="margin-bottom: 0px">
  23 + <a-select size="small" v-model="model.undertaker" placeholder="请选择承接人" allowClear>
  24 + <a-select-option
  25 + v-for="(option, optionIndex) in options"
  26 + :key="optionIndex"
  27 + :value="option.userName"
  28 + >{{ option.userName }}</a-select-option
  29 + >
772 </a-select> 30 </a-select>
773 </a-form-model-item> 31 </a-form-model-item>
774 </td> 32 </td>
775 <td> 33 <td>
776 <a-form-model-item prop="workHours" style="margin-bottom: 0px"> 34 <a-form-model-item prop="workHours" style="margin-bottom: 0px">
777 - <a-input v-model="model.workHoursjuc" style="text-align: center"></a-input> 35 + <a-input v-model="model.workHoursjig" style="text-align: center"></a-input>
778 </a-form-model-item> 36 </a-form-model-item>
779 </td> 37 </td>
780 </tr> 38 </tr>
  39 + </table> -->
781 40
782 - <!-- 附属刚铆焊一 -->  
783 - <tr>  
784 - <td>  
785 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
786 - <a-input  
787 - v-model="model.fsgmh1"  
788 - style="border: none; background-color: transparent; text-align: center"  
789 - :readOnly="true"  
790 - ></a-input>  
791 - </a-form-model-item>  
792 - </td>  
793 - <td>  
794 - <a-form-model-item prop="undertakermh1" style="margin-bottom: 0px">  
795 - <a-select size="small" v-model="model.undertakermh1" placeholder="请选择承接人" allowClear>  
796 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
797 - item.userName  
798 - }}</a-select-option>  
799 - </a-select>  
800 - </a-form-model-item>  
801 - </td>  
802 - <td>  
803 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
804 - <a-input v-model="model.workHoursmh1" style="text-align: center"></a-input>  
805 - </a-form-model-item>  
806 - </td>  
807 - </tr>  
808 - <!-- 附属刚铆焊二 -->  
809 - <tr>  
810 - <td>  
811 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
812 - <a-input  
813 - v-model="model.fsgmh2"  
814 - style="border: none; background-color: transparent; text-align: center"  
815 - :readOnly="true"  
816 - ></a-input>  
817 - </a-form-model-item>  
818 - </td>  
819 - <td>  
820 - <a-form-model-item prop="undertakermh2" style="margin-bottom: 0px">  
821 - <a-select size="small" v-model="model.undertakermh2" placeholder="请选择承接人" allowClear>  
822 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
823 - item.userName  
824 - }}</a-select-option>  
825 - </a-select>  
826 - </a-form-model-item>  
827 - </td>  
828 - <td>  
829 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
830 - <a-input v-model="model.workHoursmh2" style="text-align: center"></a-input>  
831 - </a-form-model-item>  
832 - </td>  
833 - </tr>  
834 - <!-- 附属刚焊磨 -->  
835 - <tr>  
836 - <td>  
837 - <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">  
838 - <a-input  
839 - v-model="model.fsghm"  
840 - style="border: none; background-color: transparent; text-align: center"  
841 - :readOnly="true"  
842 - ></a-input>  
843 - </a-form-model-item>  
844 - </td>  
845 - <td>  
846 - <a-form-model-item prop="undertakerhm" style="margin-bottom: 0px">  
847 - <a-select size="small" v-model="model.undertakerhm" placeholder="请选择承接人" allowClear>  
848 - <a-select-option v-for="(item, index) in options" :key="index" :value="item. userName">{{  
849 - item.userName  
850 - }}</a-select-option>  
851 - </a-select>  
852 - </a-form-model-item>  
853 - </td>  
854 - <td>  
855 - <a-form-model-item prop="workHours" style="margin-bottom: 0px">  
856 - <a-input v-model="model.workHourshm" style="text-align: center"></a-input>  
857 - </a-form-model-item>  
858 - </td>  
859 - </tr>  
860 - </table> 41 + <a-table
  42 + ref="table"
  43 + size="middle"
  44 + bordered
  45 + rowKey="id"
  46 + class="j-table-force-nowrap"
  47 + :scroll="{ x: true }"
  48 + :columns="columns"
  49 + :dataSource="res"
  50 + :pagination="false"
  51 + >
  52 + </a-table>
861 </a-form-model> 53 </a-form-model>
862 </j-form-container> 54 </j-form-container>
863 </a-spin> 55 </a-spin>
@@ -867,7 +59,7 @@ @@ -867,7 +59,7 @@
867 import { httpAction, getAction } from '@/api/manage' 59 import { httpAction, getAction } from '@/api/manage'
868 import { validateDuplicateValue } from '@/utils/util' 60 import { validateDuplicateValue } from '@/utils/util'
869 import Axios from 'axios' 61 import Axios from 'axios'
870 -import { addPg, queryBynumber, querygx } from '../../../api/manage' 62 +import { addPg, gongxuList, queryBynumber, querygx } from '../../../api/manage'
871 import { JeecgListMixin } from '@/mixins/JeecgListMixin' 63 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
872 import { listSalary } from '@/api/TblSalaryBase' 64 import { listSalary } from '@/api/TblSalaryBase'
873 import { mapGetters } from 'vuex' 65 import { mapGetters } from 'vuex'
@@ -887,85 +79,45 @@ export default { @@ -887,85 +79,45 @@ export default {
887 return { 79 return {
888 orderNumber: '', 80 orderNumber: '',
889 productType: '', 81 productType: '',
890 - zong:0,  
891 - yp:0, 82 + zong: 0,
  83 + yp: 0,
892 options: [], 84 options: [],
893 - model: {  
894 - //接地  
895 - jiedijig: '激光(50%)',  
896 - workHoursjig: 0,  
897 - undertakerjig: '',  
898 - jiedijuc: '锯床下料(0%)',  
899 - workHoursjuc: 0,  
900 - undertakerjuc: '',  
901 - jiediqg: '钳工(50%)',  
902 - workHoursqg: 0,  
903 - undertakerqg: '',  
904 - jiedihg: '焊工(0%)',  
905 - workHourshg: 0,  
906 - undertakerhg: '',  
907 -  
908 - //线槽  
909 - xiancjig: '激光(20%)',  
910 - xiancjuc: '锯床下料(6%)',  
911 - xiancqg: '钳工(32%)(折弯、打孔)',  
912 - xianchg: '焊工(42%)(焊、磨、装车)',  
913 -  
914 - //卡子  
915 - qzjig: '激光(0%)',  
916 - qzjuc: '锯床下料(50%)',  
917 - qzqg: '钳工(50%)',  
918 - qzhg: '焊工(0%)',  
919 -  
920 - //柜、箱、盒  
921 - gxhjig: '激光(13%)',  
922 - gxhjuc: '锯床下料(5%)',  
923 - gxhqg: '折弯+打孔(17%)',  
924 - gxhmh1: '铆焊一(17%)',  
925 - workHoursmh1: 0,  
926 - undertakermh1: '',  
927 - gxhmh2: '铆焊二(14%)',  
928 - workHoursmh2: 0,  
929 - undertakermh2: '',  
930 - gxhhm: '焊磨(15%)',  
931 - workHourshm: 0,  
932 - undertakerhm: '',  
933 - gxhzp: '装配(19%)',  
934 - workHourszp: 0,  
935 - undertakerzp: '',  
936 -  
937 - //司机室  
938 - sjsjig: '激光(13%)',  
939 - sjsjuc: '锯床下料(5%)',  
940 - sjsqg: '折弯(16%)',  
941 - sjsmh1: '铆焊一(22%)',  
942 - sjsmh2: '铆焊二(17%)',  
943 - sjshm: '焊磨(16%)',  
944 - sjszp: '装配(11%)',  
945 -  
946 - //附属钢  
947 - fsgjig: '激光(10%)',  
948 - fsgjuc: '锯床下料(4%)',  
949 - fsgmh1: '铆焊一(35%)',  
950 - fsgmh2: '铆焊二(30%)',  
951 - fsghm: '焊磨(21%)',  
952 - }, 85 + model: {},
953 res: [], 86 res: [],
  87 + panduan: [],
954 columns: [ 88 columns: [
955 { 89 {
956 title: '工序', 90 title: '工序',
957 align: 'center', 91 align: 'center',
  92 + width: 200,
958 dataIndex: 'workingProcedure', 93 dataIndex: 'workingProcedure',
959 }, 94 },
960 { 95 {
961 title: '承接人', 96 title: '承接人',
962 align: 'center', 97 align: 'center',
963 dataIndex: 'undertaker', 98 dataIndex: 'undertaker',
  99 + width: 200,
  100 + scopedSlots: { customRender: 'undertaker' },
  101 + customRender: (text, record, index) => {
  102 + return (
  103 + <a-select size="small" v-model={record.undertaker} placeholder="请选择承接人" allowClear>
  104 + {this.options.map((option, optionIndex) => (
  105 + <a-select-option key={optionIndex} value={option.userName}>
  106 + {option.userName}
  107 + </a-select-option>
  108 + ))}
  109 + </a-select>
  110 + )
  111 + },
964 }, 112 },
965 { 113 {
966 title: '工时', 114 title: '工时',
967 align: 'center', 115 align: 'center',
968 dataIndex: 'workHours', 116 dataIndex: 'workHours',
  117 + scopedSlots: { customRender: 'workHours' },
  118 + customRender: (text, record, index) => {
  119 + return <a-input v-model={record.workHours} style="text-align: center" />
  120 + },
969 }, 121 },
970 ], 122 ],
971 labelCol: { 123 labelCol: {
@@ -978,18 +130,12 @@ export default { @@ -978,18 +130,12 @@ export default {
978 }, 130 },
979 confirmLoading: false, 131 confirmLoading: false,
980 validatorRules: { 132 validatorRules: {
981 - undertakerjig: [{ required: true, message: '请选择承接人!' }],  
982 - undertakermh1: [{ required: true, message: '请选择承接人!' }],  
983 - undertakermh2: [{ required: true, message: '请选择承接人!' }],  
984 - undertakerjuc: [{ required: true, message: '请选择承接人!' }],  
985 - undertakerhg: [{ required: true, message: '请选择承接人!' }],  
986 - undertakerqg: [{ required: true, message: '请选择承接人!' }],  
987 - undertakerzp: [{ required: true, message: '请选择承接人!' }],  
988 - undertakerhm: [{ required: true, message: '请选择承接人!' }], 133 + undertaker: [{ required: true, message: '请选择承接人!' }],
989 }, 134 },
990 url: { 135 url: {
991 add: '/production/tblProductionGongxu/add', 136 add: '/production/tblProductionGongxu/add',
992 list: '/production/tblProductionPlan/list', 137 list: '/production/tblProductionPlan/list',
  138 + queryByType: '/production/tblProductTypeGongxu/queryByType',
993 }, 139 },
994 } 140 }
995 }, 141 },
@@ -1014,410 +160,72 @@ export default { @@ -1014,410 +160,72 @@ export default {
1014 }) 160 })
1015 }, 161 },
1016 add(record) { 162 add(record) {
1017 - this.orderNumber = record.orderNumber 163 +
  164 + console.log('产品类型:', record.productType)
1018 this.productType = record.productType 165 this.productType = record.productType
1019 - this.zong=record.totalWork  
1020 - this.yp=record.pai  
1021 - console.log('派工订单号:', this.orderNumber, '产品类型:', this.productType,"总工时:",this.zong,"已派工时:",this.yp)  
1022 - console.log('派发人:', this.userInfo().realname)  
1023 - if (this.productType === 'JD') {  
1024 - this.model.workHoursjig = parseFloat((record.totalWork * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1025 - this.model.workHoursqg = parseFloat((record.totalWork * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1026 - this.model.workHoursjuc = record.totalWork * 0  
1027 - this.model.workHourshg = record.totalWork * 0  
1028 - } else if (this.productType === 'XC') {  
1029 - this.model.workHoursjig = parseFloat((record.totalWork * 0.2).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1030 - this.model.workHoursjuc = parseFloat((record.totalWork * 0.06).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1031 - this.model.workHoursqg = parseFloat((record.totalWork * 0.32).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1032 - this.model.workHourshg = parseFloat((record.totalWork * 0.42).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1033 - } else if (this.productType === 'QZ') {  
1034 - this.model.workHoursjig = record.totalWork * 0  
1035 - this.model.workHoursjuc = parseFloat((record.totalWork * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1036 - this.model.workHoursqg = parseFloat((record.totalWork * 0.5).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1037 - this.model.workHourshg = record.totalWork * 0  
1038 - } else if (this.productType === 'GX') {  
1039 - this.model.workHoursjig = parseFloat((record.totalWork * 0.13).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1040 - this.model.workHoursjuc = parseFloat((record.totalWork * 0.05).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1041 - this.model.workHoursqg = parseFloat((record.totalWork * 0.17).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1042 - this.model.workHoursmh1 = parseFloat((record.totalWork * 0.17).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1043 - this.model.workHoursmh2 = parseFloat((record.totalWork * 0.14).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1044 - this.model.workHourshm = parseFloat((record.totalWork * 0.15).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1045 - this.model.workHourszp = parseFloat((record.totalWork * 0.19).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1046 - } else if (this.productType === 'SJ') {  
1047 - this.model.workHoursjig = parseFloat((record.totalWork * 0.13).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1048 - this.model.workHoursjuc = parseFloat((record.totalWork * 0.05).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1049 - this.model.workHoursqg = parseFloat((record.totalWork * 0.16).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1050 - this.model.workHoursmh1 = parseFloat((record.totalWork * 0.22).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1051 - this.model.workHoursmh2 = parseFloat((record.totalWork * 0.17).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1052 - this.model.workHourshm = parseFloat((record.totalWork * 0.16).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1053 - this.model.workHourszp = parseFloat((record.totalWork * 0.11).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1054 - } else if (this.productType === 'FS') {  
1055 - this.model.workHoursjig = parseFloat((record.totalWork * 0.1).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1056 - this.model.workHoursjuc = parseFloat((record.totalWork * 0.04).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1057 - this.model.workHoursmh1 = parseFloat((record.totalWork * 0.35).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1058 - this.model.workHoursmh2 = parseFloat((record.totalWork * 0.3).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1')  
1059 - this.model.workHourshm = parseFloat((record.totalWork * 0.21).toFixed(2)).toString().replace(/(\.\d*?[1-9])0+$/, '$1') 166 + this.panduan = record
  167 +
  168 + gongxuList(this.url.queryByType, { productTypeId: record.productType }).then((ress) => {
  169 + if (ress) {
  170 + //如果已派工时为0总工时*工时比例,否则(总工时-已派工时)*工时比例
  171 + console.log(record.dispatchedWorkingHours)
  172 + if (record.dispatchedWorkingHours <= 0) {
  173 + console.log('aa', ress.result)
  174 + console.log(record.totalWorkingHours)
  175 + // 将获取到的工序列表添加到数据源中
  176 + this.res = ress.result.map((item) => ({
  177 + workingProcedure: item.gongxu,
  178 + undertaker: '', // 初始为空,等待用户输入
  179 + workHours: parseFloat((record.totalWorkingHours * item.bili).toFixed(2))
  180 + .toString()
  181 + .replace(/(\.\d*?[1-9])0+$/, '$1'), // 初始为空,等待用户输入
  182 + dispatchTime: new Date(),
  183 + orderNumber: record.orderId,
  184 + dispatchRen: this.userInfo().realname,
  185 + productType: record.productType,
  186 + }))
  187 + } else if (record.dispatchedWorkingHours > 0) {
  188 + console.log('bb', ress.result)
  189 + console.log(record.totalWorkingHours)
  190 + // 将获取到的工序列表添加到数据源中
  191 + this.res = ress.result.map((item) => ({
  192 + workingProcedure: item.gongxu,
  193 + undertaker: '', // 初始为空,等待用户输入
  194 + workHours: parseFloat(((record.totalWorkingHours - record.dispatchedWorkingHours) * item.bili).toFixed(2))
  195 + .toString()
  196 + .replace(/(\.\d*?[1-9])0+$/, '$1'), // 初始为空,等待用户输入
  197 + dispatchTime: new Date(),
  198 + orderNumber: record.orderId,
  199 + dispatchRen: this.userInfo().realname,
  200 + productType: record.productType,
  201 + }))
1060 } 202 }
  203 + }
  204 + })
  205 + console.log('派发人:', this.userInfo().realname)
1061 }, 206 },
1062 ...mapGetters(['nickname', 'avatar', 'userInfo']), 207 ...mapGetters(['nickname', 'avatar', 'userInfo']),
1063 submitForm() { 208 submitForm() {
1064 const that = this 209 const that = this
1065 // 构造数据对象数组 210 // 构造数据对象数组
1066 - let data = []; 211 + let data = []
1067 // 触发表单验证 212 // 触发表单验证
1068 this.$refs.form.validate((valid) => { 213 this.$refs.form.validate((valid) => {
1069 if (valid) { 214 if (valid) {
  215 + if (!this.res.some((record) => !record.undertaker) && !this.res.some((record)=>!record.workHours)) {
1070 that.confirmLoading = true 216 that.confirmLoading = true
1071 - if (this.productType === 'JD') {  
1072 - // 构造需要发送的数据数组对象  
1073 - data = [  
1074 - {  
1075 - dispatchTime: new Date(),  
1076 - orderNumber: this.orderNumber,  
1077 - productType: this.productType,  
1078 - dispatchRen: this.userInfo().realname,  
1079 - workingProcedure: this.model.jiedijig,  
1080 - undertaker: this.model.undertakerjig,  
1081 - workHours: this.model.workHoursjig,  
1082 - },  
1083 - {  
1084 - dispatchTime: new Date(),  
1085 - orderNumber: this.orderNumber,  
1086 - productType: this.productType,  
1087 - dispatchRen: this.userInfo().realname,  
1088 - workingProcedure: this.model.jiedijuc,  
1089 - undertaker: this.model.undertakerjuc,  
1090 - workHours: this.model.workHoursjuc,  
1091 - },  
1092 - {  
1093 - dispatchTime: new Date(),  
1094 - orderNumber: this.orderNumber,  
1095 - productType: this.productType,  
1096 - dispatchRen: this.userInfo().realname,  
1097 - workingProcedure: this.model.jiediqg,  
1098 - undertaker: this.model.undertakerqg,  
1099 - workHours: this.model.workHoursqg,  
1100 - },  
1101 - {  
1102 - dispatchTime: new Date(),  
1103 - orderNumber: this.orderNumber,  
1104 - productType: this.productType,  
1105 - dispatchRen: this.userInfo().realname,  
1106 - workingProcedure: this.model.jiedihg,  
1107 - undertaker: this.model.undertakerhg,  
1108 - workHours: this.model.workHourshg,  
1109 - },  
1110 - ]  
1111 - } else if (this.productType === 'XC') {  
1112 - // 构造需要发送的数据数组对象  
1113 - data = [  
1114 - {  
1115 - dispatchTime: new Date(),  
1116 - orderNumber: this.orderNumber,  
1117 - productType: this.productType,  
1118 - dispatchRen: this.userInfo().realname,  
1119 - workingProcedure: this.model.xiancjig,  
1120 - undertaker: this.model.undertakerjig,  
1121 - workHours: this.model.workHoursjig,  
1122 - },  
1123 - {  
1124 - dispatchTime: new Date(),  
1125 - orderNumber: this.orderNumber,  
1126 - productType: this.productType,  
1127 - dispatchRen: this.userInfo().realname,  
1128 - workingProcedure: this.model.xiancjuc,  
1129 - undertaker: this.model.undertakerjuc,  
1130 - workHours: this.model.workHoursjuc,  
1131 - },  
1132 - {  
1133 - dispatchTime: new Date(),  
1134 - orderNumber: this.orderNumber,  
1135 - productType: this.productType,  
1136 - dispatchRen: this.userInfo().realname,  
1137 - workingProcedure: this.model.xiancqg,  
1138 - undertaker: this.model.undertakerqg,  
1139 - workHours: this.model.workHoursqg,  
1140 - },  
1141 - {  
1142 - dispatchTime: new Date(),  
1143 - orderNumber: this.orderNumber,  
1144 - productType: this.productType,  
1145 - dispatchRen: this.userInfo().realname,  
1146 - workingProcedure: this.model.xianchg,  
1147 - undertaker: this.model.undertakerhg,  
1148 - workHours: this.model.workHourshg,  
1149 - },  
1150 - ]  
1151 - } else if (this.productType === 'QZ') {  
1152 - // 构造需要发送的数据数组对象  
1153 - data = [  
1154 - {  
1155 - dispatchTime: new Date(),  
1156 - orderNumber: this.orderNumber,  
1157 - productType: this.productType,  
1158 - dispatchRen: this.userInfo().realname,  
1159 - workingProcedure: this.model.qzjig,  
1160 - undertaker: this.model.undertakerjig,  
1161 - workHours: this.model.workHoursjig,  
1162 - },  
1163 - {  
1164 - dispatchTime: new Date(),  
1165 - orderNumber: this.orderNumber,  
1166 - productType: this.productType,  
1167 - dispatchRen: this.userInfo().realname,  
1168 - workingProcedure: this.model.qzjuc,  
1169 - undertaker: this.model.undertakerjuc,  
1170 - workHours: this.model.workHoursjuc,  
1171 - },  
1172 - {  
1173 - dispatchTime: new Date(),  
1174 - orderNumber: this.orderNumber,  
1175 - productType: this.productType,  
1176 - dispatchRen: this.userInfo().realname,  
1177 - workingProcedure: this.model.qzqg,  
1178 - undertaker: this.model.undertakerqg,  
1179 - workHours: this.model.workHoursqg,  
1180 - },  
1181 - {  
1182 - dispatchTime: new Date(),  
1183 - orderNumber: this.orderNumber,  
1184 - productType: this.productType,  
1185 - dispatchRen: this.userInfo().realname,  
1186 - workingProcedure: this.model.qzhg,  
1187 - undertaker: this.model.undertakerhg,  
1188 - workHours: this.model.workHourshg,  
1189 - },  
1190 - ]  
1191 - }else if (this.productType === 'GX') {  
1192 - // 构造需要发送的数据数组对象  
1193 - data = [  
1194 - {  
1195 - dispatchTime: new Date(),  
1196 - orderNumber: this.orderNumber,  
1197 - productType: this.productType,  
1198 - dispatchRen: this.userInfo().realname,  
1199 - workingProcedure: this.model.gxhjig,  
1200 - undertaker: this.model.undertakerjig,  
1201 - workHours: this.model.workHoursjig,  
1202 - },  
1203 - {  
1204 - dispatchTime: new Date(),  
1205 - orderNumber: this.orderNumber,  
1206 - productType: this.productType,  
1207 - dispatchRen: this.userInfo().realname,  
1208 - workingProcedure: this.model.gxhjuc,  
1209 - undertaker: this.model.undertakerjuc,  
1210 - workHours: this.model.workHoursjuc,  
1211 - },  
1212 - {  
1213 - dispatchTime: new Date(),  
1214 - orderNumber: this.orderNumber,  
1215 - productType: this.productType,  
1216 - dispatchRen: this.userInfo().realname,  
1217 - workingProcedure: this.model.gxhqg,  
1218 - undertaker: this.model.undertakerqg,  
1219 - workHours: this.model.workHoursqg,  
1220 - },  
1221 - {  
1222 - dispatchTime: new Date(),  
1223 - orderNumber: this.orderNumber,  
1224 - productType: this.productType,  
1225 - dispatchRen: this.userInfo().realname,  
1226 - workingProcedure: this.model.gxhmh1,  
1227 - undertaker: this.model.undertakermh1,  
1228 - workHours: this.model.workHoursmh1,  
1229 - },  
1230 - {  
1231 - dispatchTime: new Date(),  
1232 - orderNumber: this.orderNumber,  
1233 - productType: this.productType,  
1234 - dispatchRen: this.userInfo().realname,  
1235 - workingProcedure: this.model.gxhmh2,  
1236 - undertaker: this.model.undertakermh2,  
1237 - workHours: this.model.workHoursmh2,  
1238 - },  
1239 - {  
1240 - dispatchTime: new Date(),  
1241 - orderNumber: this.orderNumber,  
1242 - productType: this.productType,  
1243 - dispatchRen: this.userInfo().realname,  
1244 - workingProcedure: this.model.gxhhm,  
1245 - undertaker: this.model.undertakerhm,  
1246 - workHours: this.model.workHourshm,  
1247 - },  
1248 - {  
1249 - dispatchTime: new Date(),  
1250 - orderNumber: this.orderNumber,  
1251 - productType: this.productType,  
1252 - dispatchRen: this.userInfo().realname,  
1253 - workingProcedure: this.model.gxhzp,  
1254 - undertaker: this.model.undertakerzp,  
1255 - workHours: this.model.workHourszp,  
1256 - },  
1257 -  
1258 -  
1259 - ]  
1260 - }else if (this.productType === 'SJ') {  
1261 - // 构造需要发送的数据数组对象  
1262 - data = [  
1263 - {  
1264 - dispatchTime: new Date(),  
1265 - orderNumber: this.orderNumber,  
1266 - productType: this.productType,  
1267 - dispatchRen: this.userInfo().realname,  
1268 - workingProcedure: this.model.sjsjig,  
1269 - undertaker: this.model.undertakerjig,  
1270 - workHours: this.model.workHoursjig,  
1271 - },  
1272 - {  
1273 - dispatchTime: new Date(),  
1274 - orderNumber: this.orderNumber,  
1275 - productType: this.productType,  
1276 - dispatchRen: this.userInfo().realname,  
1277 - workingProcedure: this.model.sjsjuc,  
1278 - undertaker: this.model.undertakerjuc,  
1279 - workHours: this.model.workHoursjuc,  
1280 - },  
1281 - {  
1282 - dispatchTime: new Date(),  
1283 - orderNumber: this.orderNumber,  
1284 - productType: this.productType,  
1285 - dispatchRen: this.userInfo().realname,  
1286 - workingProcedure: this.model.sjsqg,  
1287 - undertaker: this.model.undertakerqg,  
1288 - workHours: this.model.workHoursqg,  
1289 - },  
1290 - {  
1291 - dispatchTime: new Date(),  
1292 - orderNumber: this.orderNumber,  
1293 - productType: this.productType,  
1294 - dispatchRen: this.userInfo().realname,  
1295 - workingProcedure: this.model.sjsmh1,  
1296 - undertaker: this.model.undertakermh1,  
1297 - workHours: this.model.workHoursmh1,  
1298 - },  
1299 - {  
1300 - dispatchTime: new Date(),  
1301 - orderNumber: this.orderNumber,  
1302 - productType: this.productType,  
1303 - dispatchRen: this.userInfo().realname,  
1304 - workingProcedure: this.model.sjsmh2,  
1305 - undertaker: this.model.undertakermh2,  
1306 - workHours: this.model.workHoursmh2,  
1307 - },  
1308 - {  
1309 - dispatchTime: new Date(),  
1310 - orderNumber: this.orderNumber,  
1311 - productType: this.productType,  
1312 - dispatchRen: this.userInfo().realname,  
1313 - workingProcedure: this.model.sjshm,  
1314 - undertaker: this.model.undertakerhm,  
1315 - workHours: this.model.workHourshm,  
1316 - },  
1317 - {  
1318 - dispatchTime: new Date(),  
1319 - orderNumber: this.orderNumber,  
1320 - productType: this.productType,  
1321 - dispatchRen: this.userInfo().realname,  
1322 - workingProcedure: this.model.sjszp,  
1323 - undertaker: this.model.undertakerzp,  
1324 - workHours: this.model.workHourszp,  
1325 - },  
1326 - ]  
1327 - }else if (this.productType === 'FS') {  
1328 - // 构造需要发送的数据数组对象  
1329 - data = [  
1330 - {  
1331 - dispatchTime: new Date(),  
1332 - orderNumber: this.orderNumber,  
1333 - productType: this.productType,  
1334 - dispatchRen: this.userInfo().realname,  
1335 - workingProcedure: this.model.fsgjig,  
1336 - undertaker: this.model.undertakerjig,  
1337 - workHours: this.model.workHoursjig,  
1338 - },  
1339 - {  
1340 - dispatchTime: new Date(),  
1341 - orderNumber: this.orderNumber,  
1342 - productType: this.productType,  
1343 - dispatchRen: this.userInfo().realname,  
1344 - workingProcedure: this.model.fsgjuc,  
1345 - undertaker: this.model.undertakerjuc,  
1346 - workHours: this.model.workHoursjuc,  
1347 - },  
1348 -  
1349 - {  
1350 - dispatchTime: new Date(),  
1351 - orderNumber: this.orderNumber,  
1352 - productType: this.productType,  
1353 - dispatchRen: this.userInfo().realname,  
1354 - workingProcedure: this.model.fsgmh1,  
1355 - undertaker: this.model.undertakermh1,  
1356 - workHours: this.model.workHoursmh1,  
1357 - },  
1358 - {  
1359 - dispatchTime: new Date(),  
1360 - orderNumber: this.orderNumber,  
1361 - productType: this.productType,  
1362 - dispatchRen: this.userInfo().realname,  
1363 - workingProcedure: this.model.fsgmh2,  
1364 - undertaker: this.model.undertakermh2,  
1365 - workHours: this.model.workHoursmh2,  
1366 - },  
1367 - {  
1368 - dispatchTime: new Date(),  
1369 - orderNumber: this.orderNumber,  
1370 - productType: this.productType,  
1371 - dispatchRen: this.userInfo().realname,  
1372 - workingProcedure: this.model.fsghm,  
1373 - undertaker: this.model.undertakerhm,  
1374 - workHours: this.model.workHourshm,  
1375 - },  
1376 -  
1377 - ]  
1378 - }  
1379 - //接地工时和  
1380 - var jiedihe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHourshg+this.model.workHoursqg+this.yp  
1381 - //线槽  
1382 - var xche=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHourshg+this.model.workHoursqg  
1383 - console.log(xche)  
1384 - //卡子  
1385 - var qzhe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHourshg+this.model.workHoursqg+this.yp  
1386 - //柜箱盒  
1387 - var gxhe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHoursqg+this.yp+this.model.workHoursmh1+this.model.workHoursmh2+this.model.workHourshm+this.model.workHourszp  
1388 - //司机室  
1389 - var sjshe=this.model.workHoursjig+this.model.workHoursjuc+this.model.workHoursqg+this.yp+this.model.workHoursmh1+this.model.workHoursmh2+this.model.workHourshm+this.model.workHourszp  
1390 - //附属钢  
1391 - var fsghe=this.model.workHoursjig+this.model.workHoursjuc+this.yp+this.model.workHoursmh1+this.model.workHoursmh2+this.model.workHourshm  
1392 -  
1393 - if(this.productType === 'JD' && data.workHours<=this.zong && jiedihe<=this.zong){  
1394 - addPg(this.url.add, data)  
1395 - .then((res) => {  
1396 - if (res.success) {  
1397 - that.$message.success(res.message)  
1398 - that.$emit('ok')  
1399 - } else {  
1400 - that.$message.warning(res.message)  
1401 - }  
1402 - })  
1403 - .finally(() => {  
1404 - that.confirmLoading = false  
1405 - })  
1406 - }else if(this.productType === 'XC' && data.workHours<=this.zong && xche<=this.zong){  
1407 - addPg(this.url.add, data)  
1408 - .then((res) => {  
1409 - if (res.success) {  
1410 - that.$message.success(res.message)  
1411 - that.$emit('ok')  
1412 - } else {  
1413 - that.$message.warning(res.message)  
1414 - }  
1415 - })  
1416 - .finally(() => {  
1417 - that.confirmLoading = false  
1418 - })  
1419 - }else if(this.productType === 'QZ' && data.workHours<=this.zong && qzhe<=this.zong){  
1420 - addPg(this.url.add, data) 217 + console.log('res:', this.res)
  218 + // 使用 reduce 方法累加工时字段值
  219 + const zong = this.res.reduce((acc, current) => {
  220 + console.log('current.workhours:', current.workHours)
  221 + return acc + parseFloat(current.workHours)
  222 + }, 0)
  223 + console.log(this.panduan.dispatchedWorkingHours)
  224 + const zongpaifa = parseFloat(this.panduan.dispatchedWorkingHours) + zong
  225 + console.log('派发工时和:', zong)
  226 + console.log('已派发工时:', zongpaifa)
  227 + if (zongpaifa <= this.panduan.totalWorkingHours) {
  228 + addPg(this.url.add, this.res)
1421 .then((res) => { 229 .then((res) => {
1422 if (res.success) { 230 if (res.success) {
1423 that.$message.success(res.message) 231 that.$message.success(res.message)
@@ -1429,50 +237,14 @@ export default { @@ -1429,50 +237,14 @@ export default {
1429 .finally(() => { 237 .finally(() => {
1430 that.confirmLoading = false 238 that.confirmLoading = false
1431 }) 239 })
1432 - }else if(this.productType === 'GX' && data.workHours<=this.zong && gxhe<=this.zong){  
1433 - addPg(this.url.add, data)  
1434 - .then((res) => {  
1435 - if (res.success) {  
1436 - that.$message.success(res.message)  
1437 - that.$emit('ok')  
1438 - } else {  
1439 - that.$message.warning(res.message)  
1440 - }  
1441 - })  
1442 - .finally(() => { 240 + } else if (zongpaifa > this.panduan.totalWorkingHours) {
  241 + that.$message.error('派发工时超过总工时')
1443 that.confirmLoading = false 242 that.confirmLoading = false
1444 - })  
1445 - }else if(this.productType === 'SJ' && data.workHours<=this.zong && sjshe<=this.zong){  
1446 - addPg(this.url.add, data)  
1447 - .then((res) => {  
1448 - if (res.success) {  
1449 - that.$message.success(res.message)  
1450 - that.$emit('ok')  
1451 - } else {  
1452 - that.$message.warning(res.message)  
1453 } 243 }
1454 - })  
1455 - .finally(() => {  
1456 - that.confirmLoading = false  
1457 - })  
1458 - }else if(this.productType === 'FS' && data.workHours<=this.zong && fsghe<=this.zong){  
1459 - addPg(this.url.add, data)  
1460 - .then((res) => {  
1461 - if (res.success) {  
1462 - that.$message.success(res.message)  
1463 - that.$emit('ok')  
1464 } else { 244 } else {
1465 - that.$message.warning(res.message)  
1466 - }  
1467 - })  
1468 - .finally(() => {  
1469 - that.confirmLoading = false  
1470 - })  
1471 - }else{  
1472 - that.$message.error("派发工时超过总工时") 245 + that.$message.error('页面字段不能为空')
1473 that.confirmLoading = false 246 that.confirmLoading = false
1474 } 247 }
1475 -  
1476 } 248 }
1477 }) 249 })
1478 }, 250 },
@@ -5,11 +5,11 @@ @@ -5,11 +5,11 @@
5 <div class="align-colon"> 5 <div class="align-colon">
6 <p style="margin-bottom: -5px; margin-left: 50px"> 6 <p style="margin-bottom: -5px; margin-left: 50px">
7 <span>订单号:</span 7 <span>订单号:</span
8 - ><a-input v-model="model.orderNumber" style="width: 200px; border: 0px; font-weight: bold"></a-input> 8 + ><a-input v-model="model.orderId" style="width: 200px; border: 0px; font-weight: bold"></a-input>
9 </p> 9 </p>
10 <p style="margin-bottom: -5px; margin-left: 50px"> 10 <p style="margin-bottom: -5px; margin-left: 50px">
11 <span>订货单位:</span 11 <span>订货单位:</span
12 - ><a-input v-model="model.danwei" style="width: 200px; border: 0px; font-weight: bold"></a-input> 12 + ><a-input v-model="model.orderCompany" style="width: 200px; border: 0px; font-weight: bold"></a-input>
13 </p> 13 </p>
14 <p style="margin-bottom: -5px; margin-left: 50px"> 14 <p style="margin-bottom: -5px; margin-left: 50px">
15 <span>工作令:</span 15 <span>工作令:</span
@@ -21,30 +21,30 @@ @@ -21,30 +21,30 @@
21 </p> 21 </p>
22 <p style="margin-bottom: -5px; margin-left: 50px"> 22 <p style="margin-bottom: -5px; margin-left: 50px">
23 <span>产品类型:</span 23 <span>产品类型:</span
24 - ><a-input v-model="model.productType" style="width: 200px; border: 0px; font-weight: bold"></a-input> 24 + ><a-input v-model="this.productType" style="width: 200px; border: 0px; font-weight: bold"></a-input>
25 </p> 25 </p>
26 <p style="margin-bottom: -5px; margin-left: 50px"> 26 <p style="margin-bottom: -5px; margin-left: 50px">
27 <span>任务下达时间:</span 27 <span>任务下达时间:</span
28 - ><a-input v-model="model.workTime" style="width: 200px; border: 0px; font-weight: bold"></a-input> 28 + ><a-input v-model="model.orderDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
29 </p> 29 </p>
30 <p style="margin-bottom: -5px; margin-left: 50px"> 30 <p style="margin-bottom: -5px; margin-left: 50px">
31 <span>派工时间:</span 31 <span>派工时间:</span
32 - ><a-input v-model="model.dispatchTime" style="width: 200px; border: 0px; font-weight: bold"></a-input> 32 + ><a-input v-model="model.dispatchDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
33 </p> 33 </p>
34 <p style="margin-bottom: -5px; margin-left: 50px"> 34 <p style="margin-bottom: -5px; margin-left: 50px">
35 <span>交货时间:</span 35 <span>交货时间:</span
36 - ><a-input v-model="model.deliveryTime" style="width: 200px; border: 0px; font-weight: bold"></a-input> 36 + ><a-input v-model="model.deliveryDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
37 </p> 37 </p>
38 <p style="margin-bottom: -5px; margin-left: 50px"> 38 <p style="margin-bottom: -5px; margin-left: 50px">
39 <span>数量(套):</span 39 <span>数量(套):</span
40 - ><a-input v-model="model.num" style="width: 200px; border: 0px; font-weight: bold"></a-input> 40 + ><a-input v-model="model.quantity" style="width: 200px; border: 0px; font-weight: bold"></a-input>
41 </p> 41 </p>
42 <p style="margin-bottom: -5px; margin-left: 50px"> 42 <p style="margin-bottom: -5px; margin-left: 50px">
43 <span>总工时:</span 43 <span>总工时:</span
44 - ><a-input v-model="model.totalWork" style="width: 200px; border: 0px; font-weight: bold"></a-input> 44 + ><a-input v-model="model.totalWorkingHours" style="width: 200px; border: 0px; font-weight: bold"></a-input>
45 </p> 45 </p>
46 <p style="margin-left: 50px"> 46 <p style="margin-left: 50px">
47 - <span>已派发工时:</span><a-input v-model="model.pai" style="width: 200px; border: 0px"></a-input> 47 + <span>已派发工时:</span><a-input v-model="model.dispatchedWorkingHours" style="width: 200px; border: 0px; font-weight: bold"></a-input>
48 </p> 48 </p>
49 <!-- 图片容器 --> 49 <!-- 图片容器 -->
50 50
@@ -111,6 +111,7 @@ export default { @@ -111,6 +111,7 @@ export default {
111 }, 111 },
112 data() { 112 data() {
113 return { 113 return {
  114 + productType:'',
114 picList: '', 115 picList: '',
115 show: '', 116 show: '',
116 num: 0, 117 num: 0,
@@ -218,16 +219,7 @@ export default { @@ -218,16 +219,7 @@ export default {
218 this.show = this.picList[e] 219 this.show = this.picList[e]
219 this.num = e 220 this.num = e
220 }, 221 },
221 - querygx(orderNumber, productType) {  
222 - querygx(this.url.querygx, this.model).then((res) => {  
223 - console.log('工序订单号:', orderNumber)  
224 - console.log('工序产品类型:', productType)  
225 - console.log('工序查询:', res)  
226 - this.res = res.result  
227 - })  
228 - },  
229 - queryBynumber(orderNumber) {  
230 - console.log('1订单号:', orderNumber) 222 + querygx(orderId, productType) {
231 if(this.model.productType === '接地'){ 223 if(this.model.productType === '接地'){
232 this.model.productType='JD' 224 this.model.productType='JD'
233 }else if(this.model.productType === '线槽'){ 225 }else if(this.model.productType === '线槽'){
@@ -241,16 +233,48 @@ export default { @@ -241,16 +233,48 @@ export default {
241 }else if(this.model.productType === '附属钢'){ 233 }else if(this.model.productType === '附属钢'){
242 this.model.productType= 'FS' 234 this.model.productType= 'FS'
243 } 235 }
244 - queryBynumber(this.url.queryBynumber, this.model).then((res) => {  
245 - console.log(res.result)  
246 - this.imageSrc = res.result.pics  
247 - this.files = res.result.files  
248 - var picList = res.result.pics.split(',')  
249 - this.picList = picList  
250 - this.show = this.picList[0]  
251 - console.log('files:', this.files)  
252 - console.log(this.imageSrc) 236 + querygx(this.url.querygx, this.model).then((res) => {
  237 + console.log('工序订单号:', orderId)
  238 + console.log('工序产品类型:', productType)
  239 + console.log('工序查询:', res)
  240 + this.res = res.result
  241 + })
  242 + },
  243 + queryBynumber(orderId) {
  244 + console.log('1订单号:', orderId)
  245 + if(this.model.productType === '接地'){
  246 + this.productType='接地'
  247 + }else if(this.model.productType === '线槽'){
  248 + this.productType= '线槽'
  249 + }else if(this.model.productType === '卡子'){
  250 + this.productType= '卡子'
  251 + }else if(this.model.productType === '司机室'){
  252 + this.productType= '司机室'
  253 + }else if(this.model.productType === '柜、箱、盒'){
  254 + this.productType= '柜、箱、盒'
  255 + }else if(this.model.productType === '附属钢'){
  256 + this.productType= '附属钢'
  257 + }
  258 + queryBynumber(this.url.queryBynumber, { orderId: orderId }).then((res) => {
  259 +
  260 + if (res.result) {
  261 + const result = res.result;
  262 + if (result.designPic) {
  263 + this.imageSrc = result.designPic;
  264 + this.picList = result.designPic.split(',');
  265 + this.show = this.picList[0];
  266 + }
  267 + if (result.designFile) {
  268 + this.designFile = result.designFile;
  269 + console.log('files:', this.designFile);
  270 + }
  271 + } else {
  272 + console.log('Response result or required properties are missing.');
  273 + }
253 }) 274 })
  275 + .catch((error) => {
  276 + console.error('Error while fetching data:', error);
  277 + });
254 }, 278 },
255 add() { 279 add() {
256 this.edit(this.modelDefault) 280 this.edit(this.modelDefault)
@@ -35,16 +35,16 @@ @@ -35,16 +35,16 @@
35 this.$refs.realForm.add(); 35 this.$refs.realForm.add();
36 }) 36 })
37 }, 37 },
38 - queryBynumber(orderNumber){ 38 + queryBynumber(orderId){
39 this.visible=true 39 this.visible=true
40 this.$nextTick(()=>{ 40 this.$nextTick(()=>{
41 - this.$refs.realForm.queryBynumber(orderNumber); 41 + this.$refs.realForm.queryBynumber(orderId);
42 }) 42 })
43 }, 43 },
44 - querygx(orderNumber,productType){ 44 + querygx(orderId,productType){
45 this.visible=true 45 this.visible=true
46 this.$nextTick(()=>{ 46 this.$nextTick(()=>{
47 - this.$refs.realForm.querygx(orderNumber,productType) 47 + this.$refs.realForm.querygx(orderId,productType)
48 }) 48 })
49 }, 49 },
50 edit (record) { 50 edit (record) {
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <TblProductionYansForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></TblProductionYansForm>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import TblProductionYansForm from './TblProductionYansForm.vue'
  18 +
  19 + export default {
  20 + name: 'TblProductionYans',
  21 + components: {
  22 + TblProductionYansForm
  23 + },
  24 + data () {
  25 + return {
  26 + title:"操作",
  27 + width:670,
  28 + visible: false,
  29 + disableSubmit: false
  30 + }
  31 + },
  32 + methods: {
  33 + add (record) {
  34 + this.visible=true
  35 + this.$nextTick(()=>{
  36 + this.$refs.realForm.add(record);
  37 + })
  38 + },
  39 + yanshouList (record) {
  40 + this.visible=true
  41 + this.$nextTick(()=>{
  42 + this.$refs.realForm.yanshouList(record.orderNumber);
  43 + });
  44 + },
  45 + close () {
  46 + this.$emit('close');
  47 + this.visible = false;
  48 + },
  49 + submitCallback(){
  50 + this.$emit('ok');
  51 + this.visible = false;
  52 + },
  53 + handleOk () {
  54 + this.$refs.realForm.submitForm();
  55 + },
  56 + handleCancel () {
  57 + this.close()
  58 + }
  59 + }
  60 + }
  61 +</script>
  62 +
  63 +<style lang="less" scoped>
  64 +/** Button按钮间距 */
  65 + .ant-btn {
  66 + margin-left: 30px;
  67 + margin-bottom: 30px;
  68 + float: right;
  69 + }
  70 + .drawer-footer{
  71 + position: absolute;
  72 + bottom: -8px;
  73 + width: 100%;
  74 + border-top: 1px solid #e8e8e8;
  75 + padding: 10px 16px;
  76 + text-align: right;
  77 + left: 0;
  78 + background: #fff;
  79 + border-radius: 0 0 2px 2px;
  80 + }
  81 +</style>
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-table
  6 + ref="table"
  7 + size="middle"
  8 + bordered
  9 + rowKey="id"
  10 + class="j-table-force-nowrap"
  11 + :scroll="{ x: true }"
  12 + :columns="columns"
  13 + :dataSource="res"
  14 + :pagination="false"
  15 + >
  16 + </a-table>
  17 + </a-form-model>
  18 + </j-form-container>
  19 + </a-spin>
  20 +</template>
  21 +
  22 +<script>
  23 +import { httpAction, getAction } from '@/api/manage'
  24 +import { validateDuplicateValue } from '@/utils/util'
  25 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  26 +import { yanshou } from '../../../api/manage'
  27 +export default {
  28 + name: 'TblProductionYansForm',
  29 + mixins: [JeecgListMixin],
  30 + components: {},
  31 + props: {
  32 + //表单禁用
  33 + disabled: {
  34 + type: Boolean,
  35 + default: false,
  36 + required: false,
  37 + },
  38 + },
  39 + data() {
  40 + return {
  41 + model: {},
  42 + res: [],
  43 + columns: [
  44 + {
  45 + title: '工序',
  46 + align: 'center',
  47 + dataIndex: 'workingProcedure',
  48 + },
  49 + {
  50 + title: '承接人',
  51 + align: 'center',
  52 + dataIndex: 'undertaker',
  53 + },
  54 + {
  55 + title: '工时',
  56 + align: 'center',
  57 + dataIndex: 'workHours',
  58 + },
  59 + {
  60 + title: '验收结果',
  61 + align: 'center',
  62 + dataIndex: 'yanResult',
  63 + },
  64 + {
  65 + title: '备注',
  66 + align: 'center',
  67 + dataIndex: 'notes',
  68 + },
  69 + ],
  70 + labelCol: {
  71 + xs: { span: 24 },
  72 + sm: { span: 5 },
  73 + },
  74 + wrapperCol: {
  75 + xs: { span: 24 },
  76 + sm: { span: 16 },
  77 + },
  78 + confirmLoading: false,
  79 + validatorRules: {
  80 + jobId: [{ required: true, message: '请输入岗位编号!' }],
  81 + jobTitle: [{ required: true, message: '请输入岗位名称!' }],
  82 + basicSalary: [{ required: true, message: '请输入基本工资!' }],
  83 + bili: [{ required: true, message: '请输入计算比例!' }],
  84 + zongPrice: [{ required: true, message: '请输入总工资算法!' }],
  85 + },
  86 + url: {
  87 + list:'/production/tblProductionGongxu/list',
  88 + edit: '/production/tblProductionGongxu/edit',
  89 + queryByNumber:'/production/tblProductionGongxu/queryByNumber'
  90 + },
  91 + }
  92 + },
  93 + computed: {
  94 + formDisabled() {
  95 + return this.disabled
  96 + },
  97 + },
  98 + created() {
  99 + //备份model原始值
  100 + this.modelDefault = JSON.parse(JSON.stringify(this.model))
  101 + },
  102 + methods: {
  103 + yanshouList(record){
  104 + console.log(record.orderNumber)
  105 + yanshouList(this.url.queryByNumber,{orderNumber:record.orderNumber}).then((res) =>{
  106 + if(res){
  107 + this.res=res.result
  108 + }
  109 + })
  110 + },
  111 + edit(record) {
  112 + this.model = Object.assign({}, record)
  113 + this.visible = true
  114 + },
  115 + submitForm() {
  116 + const that = this
  117 + // 触发表单验证
  118 + this.$refs.form.validate((valid) => {
  119 + if (valid) {
  120 + that.confirmLoading = true
  121 + let httpurl = ''
  122 + let method = ''
  123 +
  124 + httpAction(this.url, this.model, method)
  125 + .then((res) => {
  126 + if (res.success) {
  127 + that.$message.success(res.message)
  128 + that.$emit('ok')
  129 + } else {
  130 + that.$message.warning(res.message)
  131 + }
  132 + })
  133 + .finally(() => {
  134 + that.confirmLoading = false
  135 + })
  136 + }
  137 + })
  138 + },
  139 + },
  140 +}
  141 +</script>