作者 雷海东

生产计划查看、派工

@@ -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 addPg(url,parameter){
  85 + return axios({
  86 + url:url,
  87 + method:'post',
  88 + data:parameter
  89 + })
  90 +}
83 //生产计划查看 91 //生产计划查看
84 export function queryBynumber(url,parameter){ 92 export function queryBynumber(url,parameter){
85 return axios({ 93 return axios({
@@ -232,8 +232,10 @@ @@ -232,8 +232,10 @@
232 * https://github.com/zhangdaiscott/jeecg-boot/issues/1779 232 * https://github.com/zhangdaiscott/jeecg-boot/issues/1779
233 */ 233 */
234 234
235 - /deep/ .imgupload .iconp{padding:20px;} 235 + /* /deep/ */
  236 + .imgupload .iconp{padding:20px;}
236 /* update--end--autor:lvdandan-----date:20201016------for:j-image-upload图片组件单张图片详情回显空白*/ 237 /* update--end--autor:lvdandan-----date:20201016------for:j-image-upload图片组件单张图片详情回显空白*/
237 238
238 - /deep/ .image-upload-single-over .ant-upload-select{display: none} 239 + /* /deep/ */
  240 + .image-upload-single-over .ant-upload-select{display: none}
239 </style> 241 </style>
@@ -261,6 +261,12 @@ export const JeecgListMixin = { @@ -261,6 +261,12 @@ 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 + handleAddpg:function(record){
  266 + this.$refs.pgModalForm.add(record)
  267 + this.$refs.pgModalForm.title="派工"
  268 + this.$refs.pgModalForm.disableSubmit = false;
  269 + },
264 handleTableChange(pagination, filters, sorter) { 270 handleTableChange(pagination, filters, sorter) {
265 //分页、排序、筛选变化时触发 271 //分页、排序、筛选变化时触发
266 //TODO 筛选 272 //TODO 筛选
@@ -16,7 +16,10 @@ @@ -16,7 +16,10 @@
16 </a-col> 16 </a-col>
17 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 17 <a-col :xl="6" :lg="7" :md="8" :sm="24">
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>
  21 + <a-select-option v-for="(item,index) in options" :key="index" :value="item.productTypeName">{{ item.productTypeName }}</a-select-option>
  22 + </a-select>
20 </a-form-item> 23 </a-form-item>
21 </a-col> 24 </a-col>
22 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 25 <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -50,12 +53,12 @@ @@ -50,12 +53,12 @@
50 ref="superQueryModal" 53 ref="superQueryModal"
51 @handleSuperQuery="handleSuperQuery" 54 @handleSuperQuery="handleSuperQuery"
52 ></j-super-query> --> 55 ></j-super-query> -->
53 - <a-dropdown v-if="selectedRowKeys.length > 0"> 56 + <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
54 <a-menu slot="overlay"> 57 <a-menu slot="overlay">
55 <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item> 58 <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
56 </a-menu> 59 </a-menu>
57 <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> 60 <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
58 - </a-dropdown> 61 + </a-dropdown> -->
59 </div> 62 </div>
60 63
61 <!-- table区域-begin --> 64 <!-- table区域-begin -->
@@ -77,7 +80,7 @@ @@ -77,7 +80,7 @@
77 :dataSource="dataSource" 80 :dataSource="dataSource"
78 :pagination="ipagination" 81 :pagination="ipagination"
79 :loading="loading" 82 :loading="loading"
80 - :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" 83 + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio' }"
81 class="j-table-force-nowrap" 84 class="j-table-force-nowrap"
82 @change="handleTableChange" 85 @change="handleTableChange"
83 > 86 >
@@ -105,7 +108,7 @@ @@ -105,7 +108,7 @@
105 <span slot="action" slot-scope="text, record"> 108 <span slot="action" slot-scope="text, record">
106 <a @click="handleDetail2(record)">查看</a> 109 <a @click="handleDetail2(record)">查看</a>
107 <a-divider type="vertical" /> 110 <a-divider type="vertical" />
108 - <a @click="handleEdit(record)">派工</a> 111 + <a @click="handleAddpg(record)">派工</a>
109 <a-divider type="vertical" /> 112 <a-divider type="vertical" />
110 <a @click="handleEdit(record)">验收</a> 113 <a @click="handleEdit(record)">验收</a>
111 </span> 114 </span>
@@ -113,6 +116,7 @@ @@ -113,6 +116,7 @@
113 </div> 116 </div>
114 117
115 <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>
116 </a-card> 120 </a-card>
117 </template> 121 </template>
118 122
@@ -121,15 +125,17 @@ import '@/assets/less/TableExpand.less' @@ -121,15 +125,17 @@ import '@/assets/less/TableExpand.less'
121 import { mixinDevice } from '@/utils/mixin' 125 import { mixinDevice } from '@/utils/mixin'
122 import { JeecgListMixin } from '@/mixins/JeecgListMixin' 126 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
123 import TblProductionPlanModal from './planModules/TblProductionPlanModal' 127 import TblProductionPlanModal from './planModules/TblProductionPlanModal'
124 - 128 +import TblProductionAddpg from './planModules/TblProductionAddpg.vue'
  129 +import {listProductType} from '@/api/ProductTpye'
125 export default { 130 export default {
126 name: 'TblProductionPlanList', 131 name: 'TblProductionPlanList',
127 mixins: [JeecgListMixin, mixinDevice], 132 mixins: [JeecgListMixin, mixinDevice],
128 components: { 133 components: {
129 - TblProductionPlanModal, 134 + TblProductionPlanModal,TblProductionAddpg
130 }, 135 },
131 data() { 136 data() {
132 return { 137 return {
  138 + options:[],
133 description: 'tbl_production_plan管理页面', 139 description: 'tbl_production_plan管理页面',
134 // 表头 140 // 表头
135 columns: [ 141 columns: [
@@ -167,6 +173,21 @@ export default { @@ -167,6 +173,21 @@ export default {
167 title: '产品类型', 173 title: '产品类型',
168 align: 'center', 174 align: 'center',
169 dataIndex: 'productType', 175 dataIndex: 'productType',
  176 + customRender :function(text){
  177 + if(text === 'JD'){
  178 + return '接地'
  179 + }else if(text === 'XC'){
  180 + return '线槽'
  181 + }else if(text === 'QZ'){
  182 + return '卡子'
  183 + }else if(text === 'SJ'){
  184 + return '司机室'
  185 + }else if(text === 'GX'){
  186 + return '柜、箱、盒'
  187 + }else if(text === 'FS'){
  188 + return '附属钢'
  189 + }
  190 + }
170 }, 191 },
171 { 192 {
172 title: '任务下达时间', 193 title: '任务下达时间',
@@ -229,6 +250,7 @@ export default { @@ -229,6 +250,7 @@ export default {
229 }, 250 },
230 created() { 251 created() {
231 this.getSuperFieldList() 252 this.getSuperFieldList()
  253 + this.loadTree()
232 }, 254 },
233 computed: { 255 computed: {
234 importExcelUrl: function () { 256 importExcelUrl: function () {
@@ -236,6 +258,15 @@ export default { @@ -236,6 +258,15 @@ export default {
236 }, 258 },
237 }, 259 },
238 methods: { 260 methods: {
  261 + loadTree(){
  262 + var that = this;
  263 + listProductType().then((res)=>{
  264 + if(res.success){
  265 + // that.treeData = [];
  266 + that.options = res.result
  267 + }
  268 + });
  269 + },
239 initDictConfig() {}, 270 initDictConfig() {},
240 getSuperFieldList() { 271 getSuperFieldList() {
241 let fieldList = [] 272 let fieldList = []
  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 + <TblProductionAddpgForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></TblProductionAddpgForm>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import TblProductionAddpgForm from './TblProductionAddpgForm'
  18 +
  19 + export default {
  20 + name: 'TblProductionAddpg',
  21 + components: {
  22 + TblProductionAddpgForm
  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 + edit (record) {
  40 + this.visible=true
  41 + this.$nextTick(()=>{
  42 + this.$refs.realForm.edit(record);
  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 + <!-- 接地表 -->
  6 + <table style="width: 100%; text-align: center" border v-if="productType === 'JD'">
  7 + <tr>
  8 + <th style="width: 200px">工序</th>
  9 + <th style="width: 200px">承接人</th>
  10 + <th style="width: 200px">工时</th>
  11 + </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>
  757 + <td>
  758 + <a-form-model-item prop="workingProcedure" style="margin-bottom: 0px">
  759 + <a-input
  760 + v-model="model.fsgjuc"
  761 + style="border: none; background-color: transparent; text-align: center"
  762 + :readOnly="true"
  763 + ></a-input>
  764 + </a-form-model-item>
  765 + </td>
  766 + <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>
  772 + </a-select>
  773 + </a-form-model-item>
  774 + </td>
  775 + <td>
  776 + <a-form-model-item prop="workHours" style="margin-bottom: 0px">
  777 + <a-input v-model="model.workHoursjuc" style="text-align: center"></a-input>
  778 + </a-form-model-item>
  779 + </td>
  780 + </tr>
  781 +
  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>
  861 + </a-form-model>
  862 + </j-form-container>
  863 + </a-spin>
  864 +</template>
  865 +
  866 +<script>
  867 +import { httpAction, getAction } from '@/api/manage'
  868 +import { validateDuplicateValue } from '@/utils/util'
  869 +import Axios from 'axios'
  870 +import { addPg, queryBynumber, querygx } from '../../../api/manage'
  871 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  872 +import { listSalary } from '@/api/TblSalaryBase'
  873 +import { mapGetters } from 'vuex'
  874 +export default {
  875 + name: 'TblProductionAddpgForm',
  876 + mixins: [JeecgListMixin],
  877 + components: {},
  878 + props: {
  879 + //表单禁用
  880 + disabled: {
  881 + type: Boolean,
  882 + default: false,
  883 + required: false,
  884 + },
  885 + },
  886 + data() {
  887 + return {
  888 + orderNumber: '',
  889 + productType: '',
  890 + zong:0,
  891 + yp:0,
  892 + 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 + },
  953 + res: [],
  954 + columns: [
  955 + {
  956 + title: '工序',
  957 + align: 'center',
  958 + dataIndex: 'workingProcedure',
  959 + },
  960 + {
  961 + title: '承接人',
  962 + align: 'center',
  963 + dataIndex: 'undertaker',
  964 + },
  965 + {
  966 + title: '工时',
  967 + align: 'center',
  968 + dataIndex: 'workHours',
  969 + },
  970 + ],
  971 + labelCol: {
  972 + xs: { span: 24 },
  973 + sm: { span: 5 },
  974 + },
  975 + wrapperCol: {
  976 + xs: { span: 24 },
  977 + sm: { span: 16 },
  978 + },
  979 + confirmLoading: false,
  980 + 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: '请选择承接人!' }],
  989 + },
  990 + url: {
  991 + add: '/production/tblProductionGongxu/add',
  992 + list: '/production/tblProductionPlan/list',
  993 + },
  994 + }
  995 + },
  996 + computed: {
  997 + formDisabled() {
  998 + return this.disabled
  999 + },
  1000 + },
  1001 + created() {
  1002 + //备份model原始值
  1003 + // this.modelDefault = JSON.parse(JSON.stringify(this.model))
  1004 + this.loadUser()
  1005 + },
  1006 + methods: {
  1007 + loadUser() {
  1008 + var that = this
  1009 + listSalary().then((res) => {
  1010 + if (res.success) {
  1011 + // that.treeData = [];
  1012 + that.options = res.result
  1013 + }
  1014 + })
  1015 + },
  1016 + add(record) {
  1017 + this.orderNumber = record.orderNumber
  1018 + 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')
  1060 + }
  1061 + },
  1062 + ...mapGetters(['nickname', 'avatar', 'userInfo']),
  1063 + submitForm() {
  1064 + const that = this
  1065 + // 构造数据对象数组
  1066 + let data = [];
  1067 + // 触发表单验证
  1068 + this.$refs.form.validate((valid) => {
  1069 + if (valid) {
  1070 + 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)
  1421 + .then((res) => {
  1422 + if (res.success) {
  1423 + that.$message.success(res.message)
  1424 + that.$emit('ok')
  1425 + } else {
  1426 + that.$message.warning(res.message)
  1427 + }
  1428 + })
  1429 + .finally(() => {
  1430 + that.confirmLoading = false
  1431 + })
  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(() => {
  1443 + 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 + }
  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 {
  1465 + that.$message.warning(res.message)
  1466 + }
  1467 + })
  1468 + .finally(() => {
  1469 + that.confirmLoading = false
  1470 + })
  1471 + }else{
  1472 + that.$message.error("派发工时超过总工时")
  1473 + that.confirmLoading = false
  1474 + }
  1475 +
  1476 + }
  1477 + })
  1478 + },
  1479 + },
  1480 +}
  1481 +</script>
  1482 +
  1483 +<style lang="less" scoped>
  1484 +.input_dis {
  1485 + border-color: #91d5ff;
  1486 + background-color: #e6f7ff;
  1487 +}
  1488 +</style>
@@ -3,29 +3,88 @@ @@ -3,29 +3,88 @@
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 <div class="align-colon"> 5 <div class="align-colon">
6 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>订单号:</span><a-input v-model="model.orderNumber" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
7 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>订货单位:</span><a-input v-model="model.danwei" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
8 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>工作令:</span><a-input v-model="model.workOrder" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
9 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>产品名称:</span><a-input v-model="model.productName" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
10 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>产品类型:</span><a-input v-model="model.productType" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
11 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>任务下达时间:</span><a-input v-model="model.workTime" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
12 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>派工时间:</span><a-input v-model="model.dispatchTime" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
13 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>交货时间:</span><a-input v-model="model.deliveryTime" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
14 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>数量(套):</span><a-input v-model="model.num" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
15 - <p style="margin-bottom: 0px;margin-left: 50px;"><span>总工时:</span><a-input v-model="model.totalWork" style="width: 200px;border:0px;font-weight: bold;"></a-input></p>  
16 - <p style="margin-left: 50px;"><span>已派发工时:</span><a-input v-model="model.pai" style="width: 200px;border:0px"></a-input></p> 6 + <p style="margin-bottom: -5px; margin-left: 50px">
  7 + <span>订单号:</span
  8 + ><a-input v-model="model.orderNumber" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  9 + </p>
  10 + <p style="margin-bottom: -5px; margin-left: 50px">
  11 + <span>订货单位:</span
  12 + ><a-input v-model="model.danwei" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  13 + </p>
  14 + <p style="margin-bottom: -5px; margin-left: 50px">
  15 + <span>工作令:</span
  16 + ><a-input v-model="model.workOrder" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  17 + </p>
  18 + <p style="margin-bottom: -5px; margin-left: 50px">
  19 + <span>产品名称:</span
  20 + ><a-input v-model="model.productName" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  21 + </p>
  22 + <p style="margin-bottom: -5px; margin-left: 50px">
  23 + <span>产品类型:</span
  24 + ><a-input v-model="model.productType" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  25 + </p>
  26 + <p style="margin-bottom: -5px; margin-left: 50px">
  27 + <span>任务下达时间:</span
  28 + ><a-input v-model="model.workTime" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  29 + </p>
  30 + <p style="margin-bottom: -5px; margin-left: 50px">
  31 + <span>派工时间:</span
  32 + ><a-input v-model="model.dispatchTime" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  33 + </p>
  34 + <p style="margin-bottom: -5px; margin-left: 50px">
  35 + <span>交货时间:</span
  36 + ><a-input v-model="model.deliveryTime" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  37 + </p>
  38 + <p style="margin-bottom: -5px; margin-left: 50px">
  39 + <span>数量(套):</span
  40 + ><a-input v-model="model.num" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  41 + </p>
  42 + <p style="margin-bottom: -5px; margin-left: 50px">
  43 + <span>总工时:</span
  44 + ><a-input v-model="model.totalWork" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  45 + </p>
  46 + <p style="margin-left: 50px">
  47 + <span>已派发工时:</span><a-input v-model="model.pai" style="width: 200px; border: 0px"></a-input>
  48 + </p>
17 <!-- 图片容器 --> 49 <!-- 图片容器 -->
  50 +
18 <div class="image-container-wrapper"> 51 <div class="image-container-wrapper">
19 - <div class="image-container"> 52 + <!-- <div class="image-container">
20 <j-image-upload isMultiple v-model="files" class="custom-image"></j-image-upload> 53 <j-image-upload isMultiple v-model="files" class="custom-image"></j-image-upload>
21 54
22 </div> 55 </div>
23 <div class="image-container"> 56 <div class="image-container">
24 <j-image-upload isMultiple v-model="imageSrc"></j-image-upload> 57 <j-image-upload isMultiple v-model="imageSrc"></j-image-upload>
  58 + </div> -->
  59 + <div style="display: inline-block; width: 45%">
  60 + <div class="show">
  61 + <img :src="getImgView(show)" :preview="num" alt="" height="100px" />
  62 + </div>
  63 + <div class="imgBox">
  64 + <div
  65 + :class="[num == index ? 'borderShow' : '']"
  66 + v-for="(item, index) of picList"
  67 + :key="index"
  68 + @click="onImg(index)"
  69 + >
  70 + <img :src="getImgView(item)" height="25px" alt="" style="margin-left: 20px" />
  71 + </div>
  72 + </div>
25 </div> 73 </div>
26 </div> 74 </div>
27 </div> 75 </div>
28 - <a-table :columns="columns" :data-source="res" style="width: auto" :pagination="false"></a-table> 76 + <a-table
  77 + ref="table"
  78 + size="middle"
  79 + bordered
  80 + rowKey="id"
  81 + class="j-table-force-nowrap"
  82 + :scroll="{ x: true }"
  83 + :columns="columns"
  84 + :dataSource="res"
  85 + :pagination="false"
  86 + >
  87 + </a-table>
29 </a-form-model> 88 </a-form-model>
30 </j-form-container> 89 </j-form-container>
31 </a-spin> 90 </a-spin>
@@ -36,9 +95,11 @@ import { httpAction, getAction } from '@/api/manage' @@ -36,9 +95,11 @@ import { httpAction, getAction } from '@/api/manage'
36 import { validateDuplicateValue } from '@/utils/util' 95 import { validateDuplicateValue } from '@/utils/util'
37 import Axios from 'axios' 96 import Axios from 'axios'
38 import { queryBynumber, querygx } from '../../../api/manage' 97 import { queryBynumber, querygx } from '../../../api/manage'
  98 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
39 99
40 export default { 100 export default {
41 name: 'TblProductionPlanForm', 101 name: 'TblProductionPlanForm',
  102 + mixins: [JeecgListMixin],
42 components: {}, 103 components: {},
43 props: { 104 props: {
44 //表单禁用 105 //表单禁用
@@ -50,10 +111,13 @@ export default { @@ -50,10 +111,13 @@ export default {
50 }, 111 },
51 data() { 112 data() {
52 return { 113 return {
  114 + picList: '',
  115 + show: '',
  116 + num: 0,
53 imageSrc: '', 117 imageSrc: '',
54 files: '', 118 files: '',
55 model: {}, 119 model: {},
56 - res:[], 120 + res: [],
57 columns: [ 121 columns: [
58 { 122 {
59 title: '工序', 123 title: '工序',
@@ -70,7 +134,7 @@ export default { @@ -70,7 +134,7 @@ export default {
70 align: 'center', 134 align: 'center',
71 dataIndex: 'workHours', 135 dataIndex: 'workHours',
72 }, 136 },
73 - 137 +
74 { 138 {
75 title: '派发时间', 139 title: '派发时间',
76 align: 'center', 140 align: 'center',
@@ -136,6 +200,7 @@ export default { @@ -136,6 +200,7 @@ export default {
136 queryById: '/production/tblProductionPlan/queryById', 200 queryById: '/production/tblProductionPlan/queryById',
137 queryBynumber: '/production/tblProductionPlan/queryBynumber', 201 queryBynumber: '/production/tblProductionPlan/queryBynumber',
138 querygx: '/production/tblProductionPlan/querygx', 202 querygx: '/production/tblProductionPlan/querygx',
  203 + list: "/order_form/tblOrderForm/list",
139 }, 204 },
140 } 205 }
141 }, 206 },
@@ -147,23 +212,42 @@ export default { @@ -147,23 +212,42 @@ export default {
147 created() { 212 created() {
148 //备份model原始值 213 //备份model原始值
149 this.modelDefault = JSON.parse(JSON.stringify(this.model)) 214 this.modelDefault = JSON.parse(JSON.stringify(this.model))
150 -  
151 }, 215 },
152 methods: { 216 methods: {
153 - querygx(orderNumber,productType) { 217 + onImg(e) {
  218 + this.show = this.picList[e]
  219 + this.num = e
  220 + },
  221 + querygx(orderNumber, productType) {
154 querygx(this.url.querygx, this.model).then((res) => { 222 querygx(this.url.querygx, this.model).then((res) => {
155 - console.log('工序订单号:', orderNumber)  
156 - console.log('工序产品类型:', productType)  
157 - console.log("工序查询:",res)  
158 - this.res=res.result 223 + console.log('工序订单号:', orderNumber)
  224 + console.log('工序产品类型:', productType)
  225 + console.log('工序查询:', res)
  226 + this.res = res.result
159 }) 227 })
160 }, 228 },
161 queryBynumber(orderNumber) { 229 queryBynumber(orderNumber) {
162 console.log('1订单号:', orderNumber) 230 console.log('1订单号:', orderNumber)
  231 + if(this.model.productType === '接地'){
  232 + this.model.productType='JD'
  233 + }else if(this.model.productType === '线槽'){
  234 + this.model.productType= 'XC'
  235 + }else if(this.model.productType === '卡子'){
  236 + this.model.productType= 'QZ'
  237 + }else if(this.model.productType === '司机室'){
  238 + this.model.productType= 'SJ'
  239 + }else if(this.model.productType === '柜、箱、盒'){
  240 + this.model.productType= 'GX'
  241 + }else if(this.model.productType === '附属钢'){
  242 + this.model.productType= 'FS'
  243 + }
163 queryBynumber(this.url.queryBynumber, this.model).then((res) => { 244 queryBynumber(this.url.queryBynumber, this.model).then((res) => {
164 console.log(res.result) 245 console.log(res.result)
165 this.imageSrc = res.result.pics 246 this.imageSrc = res.result.pics
166 this.files = res.result.files 247 this.files = res.result.files
  248 + var picList = res.result.pics.split(',')
  249 + this.picList = picList
  250 + this.show = this.picList[0]
167 console.log('files:', this.files) 251 console.log('files:', this.files)
168 console.log(this.imageSrc) 252 console.log(this.imageSrc)
169 }) 253 })
@@ -173,6 +257,19 @@ export default { @@ -173,6 +257,19 @@ export default {
173 }, 257 },
174 edit(record) { 258 edit(record) {
175 this.model = Object.assign({}, record) 259 this.model = Object.assign({}, record)
  260 + if(this.model.productType === 'JD'){
  261 + this.model.productType='接地'
  262 + }else if(this.model.productType === 'XC'){
  263 + this.model.productType= '线槽'
  264 + }else if(this.model.productType === 'QZ'){
  265 + this.model.productType= '卡子'
  266 + }else if(this.model.productType === 'SJ'){
  267 + this.model.productType= '司机室'
  268 + }else if(this.model.productType === 'GX'){
  269 + this.model.productType= '柜、箱、盒'
  270 + }else if(this.model.productType === 'FS'){
  271 + this.model.productType= '附属钢'
  272 + }
176 this.visible = true 273 this.visible = true
177 }, 274 },
178 submitForm() { 275 submitForm() {
@@ -227,6 +324,28 @@ export default { @@ -227,6 +324,28 @@ export default {
227 float: right; /* 右浮动 */ 324 float: right; /* 右浮动 */
228 margin-top: -300px; /* 调整顶部外边距以与其他内容对齐 */ 325 margin-top: -300px; /* 调整顶部外边距以与其他内容对齐 */
229 } 326 }
  327 +.imgBox {
  328 + display: flex;
  329 +}
  330 +
  331 +.imgBox img {
  332 + width: 50px;
  333 + height: 50px;
  334 + margin: 10px;
  335 +}
  336 +.show img{
  337 + margin-bottom: 10px;
  338 + height: 200px;
  339 + width: 200px;
  340 +}
  341 +
  342 +.imgBox div {
  343 + margin: 5px;
  344 +}
  345 +
  346 +.borderShow {
  347 + border: 2px solid rgb(141, 134, 134);
  348 +}
230 349
231 .image-container { 350 .image-container {
232 margin-bottom: -10px; /* 图片容器下边距 */ 351 margin-bottom: -10px; /* 图片容器下边距 */
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" 8 :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
9 @cancel="handleCancel" 9 @cancel="handleCancel"
10 cancelText="关闭"> 10 cancelText="关闭">
11 - <tbl-production-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-production-plan-form> 11 + <tbl-production-plan-form ref="realForm" @ok="submitCallback"></tbl-production-plan-form>
12 </j-modal> 12 </j-modal>
13 </template> 13 </template>
14 14