正在显示
9 个修改的文件
包含
176 行增加
和
123 行删除
| @@ -181,21 +181,21 @@ | @@ -181,21 +181,21 @@ | ||
| 181 | align:"center", | 181 | align:"center", |
| 182 | dataIndex: 'applicant' | 182 | dataIndex: 'applicant' |
| 183 | }, | 183 | }, |
| 184 | - { | ||
| 185 | - title:'一级审批人', | ||
| 186 | - align:"center", | ||
| 187 | - dataIndex: 'spOne' | ||
| 188 | - }, | ||
| 189 | - { | ||
| 190 | - title:'二级审批人', | ||
| 191 | - align:"center", | ||
| 192 | - dataIndex: 'spTwo' | ||
| 193 | - }, | ||
| 194 | - { | ||
| 195 | - title:'不同意备注', | ||
| 196 | - align:"center", | ||
| 197 | - dataIndex: 'noNotes' | ||
| 198 | - }, | 184 | + // { |
| 185 | + // title:'一级审批人', | ||
| 186 | + // align:"center", | ||
| 187 | + // dataIndex: 'spOne' | ||
| 188 | + // }, | ||
| 189 | + // { | ||
| 190 | + // title:'二级审批人', | ||
| 191 | + // align:"center", | ||
| 192 | + // dataIndex: 'spTwo' | ||
| 193 | + // }, | ||
| 194 | + // { | ||
| 195 | + // title:'不同意备注', | ||
| 196 | + // align:"center", | ||
| 197 | + // dataIndex: 'noNotes' | ||
| 198 | + // }, | ||
| 199 | { | 199 | { |
| 200 | title:'申请日期', | 200 | title:'申请日期', |
| 201 | align:"center", | 201 | align:"center", |
| @@ -214,7 +214,7 @@ | @@ -214,7 +214,7 @@ | ||
| 214 | } | 214 | } |
| 215 | ], | 215 | ], |
| 216 | url: { | 216 | url: { |
| 217 | - list: "/trad/biddingSq/list", | 217 | + list: "/trad/biddingSq/list1", |
| 218 | delete: "/trad/tblBiddingShenq/delete", | 218 | delete: "/trad/tblBiddingShenq/delete", |
| 219 | deleteBatch: "/trad/tblBiddingShenq/deleteBatch", | 219 | deleteBatch: "/trad/tblBiddingShenq/deleteBatch", |
| 220 | exportXlsUrl: "/trad/tblBiddingShenq/exportXls", | 220 | exportXlsUrl: "/trad/tblBiddingShenq/exportXls", |
| @@ -92,34 +92,13 @@ | @@ -92,34 +92,13 @@ | ||
| 92 | <span v-if="record.chooseStatus == 1">否</span> | 92 | <span v-if="record.chooseStatus == 1">否</span> |
| 93 | </template> | 93 | </template> |
| 94 | <span slot="action" slot-scope="text, record"> | 94 | <span slot="action" slot-scope="text, record"> |
| 95 | - <a @click="handleEdit(record)">编辑</a> | ||
| 96 | - <a-divider type="vertical" /> | ||
| 97 | - <a @click="handleEdit(record)" v-if="cgzg || cjgly">审批</a> | ||
| 98 | - <a-divider type="vertical" v-if="cgzg || cjgly"/> | ||
| 99 | - <!-- <a @click="handleDetail(record)">详情</a> | ||
| 100 | - <a-divider type="vertical" v-if="record.chooseStatus == 1"/> | ||
| 101 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.chooseStatus == 1"> | ||
| 102 | - <a>删除</a> | ||
| 103 | - </a-popconfirm> --> | ||
| 104 | - <a-dropdown> | ||
| 105 | - <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | ||
| 106 | - <a-menu slot="overlay"> | ||
| 107 | - <a-menu-item> | ||
| 108 | - <a @click="handleDetail(record)">详情</a> | ||
| 109 | - </a-menu-item> | ||
| 110 | - <a-menu-item v-if="record.chooseStatus == 1"> | ||
| 111 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | ||
| 112 | - <a>删除</a> | ||
| 113 | - </a-popconfirm> | ||
| 114 | - </a-menu-item> | ||
| 115 | - </a-menu> | ||
| 116 | - </a-dropdown> | 95 | + <a @click="handleApproval2(record)">审批</a> |
| 117 | </span> | 96 | </span> |
| 118 | 97 | ||
| 119 | </a-table> | 98 | </a-table> |
| 120 | </div> | 99 | </div> |
| 121 | 100 | ||
| 122 | - <tbl-bidding-shenq-modal ref="modalForm" @ok="modalFormOk"></tbl-bidding-shenq-modal> | 101 | + <TblBiddingShenqApproval2Model ref="TblBiddingShenqApproval2Model" @ok="modalFormOk"></TblBiddingShenqApproval2Model> |
| 123 | </a-card> | 102 | </a-card> |
| 124 | </template> | 103 | </template> |
| 125 | 104 | ||
| @@ -131,11 +110,12 @@ | @@ -131,11 +110,12 @@ | ||
| 131 | import TblBiddingShenqModal from './modules/TblBiddingShenqModal' | 110 | import TblBiddingShenqModal from './modules/TblBiddingShenqModal' |
| 132 | import store from '@/store/' | 111 | import store from '@/store/' |
| 133 | import { ROLES } from "@/store/mutation-types" | 112 | import { ROLES } from "@/store/mutation-types" |
| 113 | + import TblBiddingShenqApproval2Model from './modules/TblBiddingShenqApproval2Model' | ||
| 134 | export default { | 114 | export default { |
| 135 | name: 'TblBiddingShenqList', | 115 | name: 'TblBiddingShenqList', |
| 136 | mixins:[JeecgListMixin, mixinDevice], | 116 | mixins:[JeecgListMixin, mixinDevice], |
| 137 | components: { | 117 | components: { |
| 138 | - TblBiddingShenqModal | 118 | + TblBiddingShenqApproval2Model |
| 139 | }, | 119 | }, |
| 140 | data () { | 120 | data () { |
| 141 | return { | 121 | return { |
| @@ -221,21 +201,21 @@ | @@ -221,21 +201,21 @@ | ||
| 221 | align:"center", | 201 | align:"center", |
| 222 | dataIndex: 'applicant' | 202 | dataIndex: 'applicant' |
| 223 | }, | 203 | }, |
| 224 | - { | ||
| 225 | - title:'一级审批人', | ||
| 226 | - align:"center", | ||
| 227 | - dataIndex: 'spOne' | ||
| 228 | - }, | ||
| 229 | - { | ||
| 230 | - title:'二级审批人', | ||
| 231 | - align:"center", | ||
| 232 | - dataIndex: 'spTwo' | ||
| 233 | - }, | ||
| 234 | - { | ||
| 235 | - title:'不同意备注', | ||
| 236 | - align:"center", | ||
| 237 | - dataIndex: 'noNotes' | ||
| 238 | - }, | 204 | + // { |
| 205 | + // title:'一级审批人', | ||
| 206 | + // align:"center", | ||
| 207 | + // dataIndex: 'spOne' | ||
| 208 | + // }, | ||
| 209 | + // { | ||
| 210 | + // title:'二级审批人', | ||
| 211 | + // align:"center", | ||
| 212 | + // dataIndex: 'spTwo' | ||
| 213 | + // }, | ||
| 214 | + // { | ||
| 215 | + // title:'不同意备注', | ||
| 216 | + // align:"center", | ||
| 217 | + // dataIndex: 'noNotes' | ||
| 218 | + // }, | ||
| 239 | { | 219 | { |
| 240 | title:'申请日期', | 220 | title:'申请日期', |
| 241 | align:"center", | 221 | align:"center", |
| @@ -254,7 +234,7 @@ | @@ -254,7 +234,7 @@ | ||
| 254 | } | 234 | } |
| 255 | ], | 235 | ], |
| 256 | url: { | 236 | url: { |
| 257 | - list: "/trad/biddingSq/list", | 237 | + list: "/trad/biddingSq/list2", |
| 258 | delete: "/trad/tblBiddingShenq/delete", | 238 | delete: "/trad/tblBiddingShenq/delete", |
| 259 | deleteBatch: "/trad/tblBiddingShenq/deleteBatch", | 239 | deleteBatch: "/trad/tblBiddingShenq/deleteBatch", |
| 260 | exportXlsUrl: "/trad/tblBiddingShenq/exportXls", | 240 | exportXlsUrl: "/trad/tblBiddingShenq/exportXls", |
| @@ -293,6 +273,10 @@ | @@ -293,6 +273,10 @@ | ||
| 293 | const cjgly = this.roleCodeList.includes('WorkshopDirector') | 273 | const cjgly = this.roleCodeList.includes('WorkshopDirector') |
| 294 | this.cjgly = cjgly | 274 | this.cjgly = cjgly |
| 295 | }, | 275 | }, |
| 276 | + handleApproval2(record){ | ||
| 277 | + this.$refs.TblBiddingShenqApproval2Model.edit(record); | ||
| 278 | + this.$refs.TblBiddingShenqApproval2Model.disableSubmit = false; | ||
| 279 | + }, | ||
| 296 | initDictConfig(){ | 280 | initDictConfig(){ |
| 297 | }, | 281 | }, |
| 298 | getSuperFieldList(){ | 282 | getSuperFieldList(){ |
| @@ -91,15 +91,27 @@ | @@ -91,15 +91,27 @@ | ||
| 91 | <span v-if="record.chooseStatus == 0">是</span> | 91 | <span v-if="record.chooseStatus == 0">是</span> |
| 92 | <span v-if="record.chooseStatus == 1">否</span> | 92 | <span v-if="record.chooseStatus == 1">否</span> |
| 93 | </template> | 93 | </template> |
| 94 | + <template slot="approvalResultSlot" slot-scope="text, record"> | ||
| 95 | + <a-tag color="green" v-if="record.approvalResult == '1'">同意</a-tag> | ||
| 96 | + <a-tag color="red" v-if="record.approvalResult == '2'">不同意</a-tag> | ||
| 97 | + </template> | ||
| 98 | + | ||
| 99 | + <template slot="approvalStatusSlot" slot-scope="text, record"> | ||
| 100 | + <a-tag color="orange" v-if="record.approvalStatus == '0'">待审批</a-tag> | ||
| 101 | + <a-tag color="purple" v-if="record.approvalStatus == '1'">审批中</a-tag> | ||
| 102 | + <a-tag color="green" v-if="record.approvalStatus == '2'">审批完成</a-tag> | ||
| 103 | + <!-- <span v-if="record.approvalResult == '1'">同意</span> | ||
| 104 | + <span v-if="record.approvalResult == '2'">不同意</span> --> | ||
| 105 | + </template> | ||
| 94 | <span slot="action" slot-scope="text, record"> | 106 | <span slot="action" slot-scope="text, record"> |
| 95 | - <a @click="handleEdit(record)">编辑</a> | ||
| 96 | - <a-divider type="vertical" /> | ||
| 97 | - <!-- <a @click="handleDetail(record)">详情</a> | ||
| 98 | - <a-divider type="vertical" v-if="record.chooseStatus == 1"/> | ||
| 99 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.chooseStatus == 1"> | 107 | + <a @click="handleEdit(record)" v-if="record.approvalStatus=='0'">编辑</a> |
| 108 | + <a-divider type="vertical" v-if="record.approvalStatus=='0'"/> | ||
| 109 | + <a @click="handleDetail(record)">详情</a> | ||
| 110 | + <a-divider type="vertical" v-if="record.approvalStatus=='0'"/> | ||
| 111 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.approvalStatus=='0'"> | ||
| 100 | <a>删除</a> | 112 | <a>删除</a> |
| 101 | - </a-popconfirm> --> | ||
| 102 | - <a-dropdown> | 113 | + </a-popconfirm> |
| 114 | + <!-- <a-dropdown> | ||
| 103 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | 115 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| 104 | <a-menu slot="overlay"> | 116 | <a-menu slot="overlay"> |
| 105 | <a-menu-item> | 117 | <a-menu-item> |
| @@ -111,7 +123,7 @@ | @@ -111,7 +123,7 @@ | ||
| 111 | </a-popconfirm> | 123 | </a-popconfirm> |
| 112 | </a-menu-item> | 124 | </a-menu-item> |
| 113 | </a-menu> | 125 | </a-menu> |
| 114 | - </a-dropdown> | 126 | + </a-dropdown> --> |
| 115 | </span> | 127 | </span> |
| 116 | 128 | ||
| 117 | </a-table> | 129 | </a-table> |
| @@ -220,20 +232,23 @@ | @@ -220,20 +232,23 @@ | ||
| 220 | dataIndex: 'applicant' | 232 | dataIndex: 'applicant' |
| 221 | }, | 233 | }, |
| 222 | { | 234 | { |
| 223 | - title:'一级审批人', | ||
| 224 | - align:"center", | ||
| 225 | - dataIndex: 'spOne' | ||
| 226 | - }, | ||
| 227 | - { | ||
| 228 | - title:'二级审批人', | 235 | + title:'审批状态', |
| 229 | align:"center", | 236 | align:"center", |
| 230 | - dataIndex: 'spTwo' | 237 | + dataIndex: 'approvalStatus', |
| 238 | + scopedSlots: { customRender: 'approvalStatusSlot' } | ||
| 231 | }, | 239 | }, |
| 232 | { | 240 | { |
| 233 | - title:'不同意备注', | 241 | + title:'审批结果', |
| 234 | align:"center", | 242 | align:"center", |
| 235 | - dataIndex: 'noNotes' | 243 | + dataIndex: 'approvalResult', |
| 244 | + scopedSlots: { customRender: 'approvalResultSlot' } | ||
| 245 | + | ||
| 236 | }, | 246 | }, |
| 247 | + // { | ||
| 248 | + // title:'不同意备注', | ||
| 249 | + // align:"center", | ||
| 250 | + // dataIndex: 'noNotes' | ||
| 251 | + // }, | ||
| 237 | { | 252 | { |
| 238 | title:'申请日期', | 253 | title:'申请日期', |
| 239 | align:"center", | 254 | align:"center", |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | <a-row> | 7 | <a-row> |
| 8 | <a-col :span="24"> | 8 | <a-col :span="24"> |
| 9 | <a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree"> | 9 | <a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree"> |
| 10 | - <a-radio-group v-model="value" @change="onChange"> | 10 | + <a-radio-group v-model="model.isagree" @change="onChange"> |
| 11 | <a-radio :value="'1'"> | 11 | <a-radio :value="'1'"> |
| 12 | 同意 | 12 | 同意 |
| 13 | </a-radio> | 13 | </a-radio> |
| @@ -73,7 +73,7 @@ | @@ -73,7 +73,7 @@ | ||
| 73 | ], | 73 | ], |
| 74 | }, | 74 | }, |
| 75 | url: { | 75 | url: { |
| 76 | - add: "/bidding_shenq_approval/tblBiddingShenqApproval/add", | 76 | + add: "/bidding_shenq_approval/biddingShenqApproval/add", |
| 77 | edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit", | 77 | edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit", |
| 78 | queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/queryById" | 78 | queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/queryById" |
| 79 | } | 79 | } |
| @@ -108,18 +108,24 @@ | @@ -108,18 +108,24 @@ | ||
| 108 | this.$refs.form.validate(valid => { | 108 | this.$refs.form.validate(valid => { |
| 109 | if (valid) { | 109 | if (valid) { |
| 110 | console.log(this.model) | 110 | console.log(this.model) |
| 111 | - return | ||
| 112 | - that.confirmLoading = true; | ||
| 113 | - let httpurl = ''; | ||
| 114 | - let method = ''; | ||
| 115 | - if(!this.model.id){ | ||
| 116 | - httpurl+=this.url.add; | ||
| 117 | - method = 'post'; | ||
| 118 | - }else{ | ||
| 119 | - httpurl+=this.url.edit; | ||
| 120 | - method = 'put'; | 111 | + const tempMOdel = { |
| 112 | + partNumber:this.model.partNumber, | ||
| 113 | + approvalOpinions:this.model.approvalOpinions, | ||
| 114 | + isagree:this.model.isagree, | ||
| 115 | + approvalLevel:'1' | ||
| 121 | } | 116 | } |
| 122 | - httpAction(httpurl,this.model,method).then((res)=>{ | 117 | + // return |
| 118 | + that.confirmLoading = true; | ||
| 119 | + // let httpurl = this.url.add; | ||
| 120 | + let method = 'post'; | ||
| 121 | + // if(!this.model.id){ | ||
| 122 | + // httpurl+=this.url.add; | ||
| 123 | + // method = 'post'; | ||
| 124 | + // }else{ | ||
| 125 | + // httpurl+=this.url.edit; | ||
| 126 | + // method = 'put'; | ||
| 127 | + // } | ||
| 128 | + httpAction(this.url.add,tempMOdel,method).then((res)=>{ | ||
| 123 | if(res.success){ | 129 | if(res.success){ |
| 124 | that.$message.success(res.message); | 130 | that.$message.success(res.message); |
| 125 | that.$emit('ok'); | 131 | that.$emit('ok'); |
| @@ -128,6 +134,7 @@ | @@ -128,6 +134,7 @@ | ||
| 128 | } | 134 | } |
| 129 | }).finally(() => { | 135 | }).finally(() => { |
| 130 | that.confirmLoading = false; | 136 | that.confirmLoading = false; |
| 137 | + this.close() | ||
| 131 | }) | 138 | }) |
| 132 | } | 139 | } |
| 133 | 140 |
| 1 | <template> | 1 | <template> |
| 2 | + <j-modal :title="title" :width="width" :visible="visible" :confirmLoading="confirmLoading" :maskClosable="false" | ||
| 3 | + switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="关闭"> | ||
| 2 | <a-spin :spinning="confirmLoading"> | 4 | <a-spin :spinning="confirmLoading"> |
| 3 | - <j-form-container :disabled="formDisabled"> | ||
| 4 | - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | 5 | + <!-- <j-form-container :disabled="formDisabled"> --> |
| 6 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
| 5 | <a-row> | 7 | <a-row> |
| 6 | <a-col :span="24"> | 8 | <a-col :span="24"> |
| 7 | - <a-form-model-item label="审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approval"> | ||
| 8 | - <a-input v-model="model.approval" placeholder="请输入审批人" ></a-input> | 9 | + <a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree"> |
| 10 | + <a-radio-group v-model="model.isagree" @change="onChange"> | ||
| 11 | + <a-radio :value="'1'"> | ||
| 12 | + 同意 | ||
| 13 | + </a-radio> | ||
| 14 | + <a-radio :value="'2'"> | ||
| 15 | + 不同意 | ||
| 16 | + </a-radio> | ||
| 17 | + </a-radio-group> | ||
| 9 | </a-form-model-item> | 18 | </a-form-model-item> |
| 10 | </a-col> | 19 | </a-col> |
| 11 | <a-col :span="24"> | 20 | <a-col :span="24"> |
| 12 | <a-form-model-item label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinions"> | 21 | <a-form-model-item label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinions"> |
| 13 | - <a-input v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-input> | ||
| 14 | - </a-form-model-item> | ||
| 15 | - </a-col> | ||
| 16 | - <a-col :span="24"> | ||
| 17 | - <a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree"> | ||
| 18 | - <a-input v-model="model.isagree" placeholder="请输入是否同意" ></a-input> | 22 | + <a-textarea v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-textarea> |
| 19 | </a-form-model-item> | 23 | </a-form-model-item> |
| 20 | </a-col> | 24 | </a-col> |
| 25 | + | ||
| 21 | </a-row> | 26 | </a-row> |
| 22 | </a-form-model> | 27 | </a-form-model> |
| 23 | - </j-form-container> | 28 | + <!-- </j-form-container> --> |
| 24 | </a-spin> | 29 | </a-spin> |
| 30 | +</j-modal> | ||
| 25 | </template> | 31 | </template> |
| 26 | 32 | ||
| 27 | <script> | 33 | <script> |
| @@ -30,7 +36,7 @@ | @@ -30,7 +36,7 @@ | ||
| 30 | import { validateDuplicateValue } from '@/utils/util' | 36 | import { validateDuplicateValue } from '@/utils/util' |
| 31 | 37 | ||
| 32 | export default { | 38 | export default { |
| 33 | - name: 'TblBiddingShenqApprovalForm', | 39 | + name: 'TblBiddingShenqApproval2Model', |
| 34 | components: { | 40 | components: { |
| 35 | }, | 41 | }, |
| 36 | props: { | 42 | props: { |
| @@ -43,8 +49,12 @@ | @@ -43,8 +49,12 @@ | ||
| 43 | }, | 49 | }, |
| 44 | data () { | 50 | data () { |
| 45 | return { | 51 | return { |
| 52 | + title: "操作", | ||
| 53 | + width: 800, | ||
| 46 | model:{ | 54 | model:{ |
| 47 | }, | 55 | }, |
| 56 | + visible: false, | ||
| 57 | + value:'1', | ||
| 48 | labelCol: { | 58 | labelCol: { |
| 49 | xs: { span: 24 }, | 59 | xs: { span: 24 }, |
| 50 | sm: { span: 5 }, | 60 | sm: { span: 5 }, |
| @@ -55,9 +65,15 @@ | @@ -55,9 +65,15 @@ | ||
| 55 | }, | 65 | }, |
| 56 | confirmLoading: false, | 66 | confirmLoading: false, |
| 57 | validatorRules: { | 67 | validatorRules: { |
| 68 | + isagree: [ | ||
| 69 | + { required: true, message: '请选择!' }, | ||
| 70 | + ], | ||
| 71 | + approvalOpinions: [ | ||
| 72 | + { required: true, message: '请输入审批意见!' }, | ||
| 73 | + ], | ||
| 58 | }, | 74 | }, |
| 59 | url: { | 75 | url: { |
| 60 | - add: "/bidding_shenq_approval/tblBiddingShenqApproval/add", | 76 | + add: "/bidding_shenq_approval/biddingShenqApproval/add2", |
| 61 | edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit", | 77 | edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit", |
| 62 | queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/queryById" | 78 | queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/queryById" |
| 63 | } | 79 | } |
| @@ -79,23 +95,37 @@ | @@ -79,23 +95,37 @@ | ||
| 79 | edit (record) { | 95 | edit (record) { |
| 80 | this.model = Object.assign({}, record); | 96 | this.model = Object.assign({}, record); |
| 81 | this.visible = true; | 97 | this.visible = true; |
| 98 | + this.model.isagree = '1' | ||
| 99 | + console.log('this.model',this.model) | ||
| 82 | }, | 100 | }, |
| 83 | - submitForm () { | 101 | + onChange(e) { |
| 102 | + console.log('radio checked', e.target.value); | ||
| 103 | + this.model.isagree = this.value | ||
| 104 | + }, | ||
| 105 | + handleOk () { | ||
| 84 | const that = this; | 106 | const that = this; |
| 85 | // 触发表单验证 | 107 | // 触发表单验证 |
| 86 | this.$refs.form.validate(valid => { | 108 | this.$refs.form.validate(valid => { |
| 87 | if (valid) { | 109 | if (valid) { |
| 88 | - that.confirmLoading = true; | ||
| 89 | - let httpurl = ''; | ||
| 90 | - let method = ''; | ||
| 91 | - if(!this.model.id){ | ||
| 92 | - httpurl+=this.url.add; | ||
| 93 | - method = 'post'; | ||
| 94 | - }else{ | ||
| 95 | - httpurl+=this.url.edit; | ||
| 96 | - method = 'put'; | 110 | + console.log(this.model) |
| 111 | + const tempMOdel = { | ||
| 112 | + partNumber:this.model.partNumber, | ||
| 113 | + approvalOpinions:this.model.approvalOpinions, | ||
| 114 | + isagree:this.model.isagree, | ||
| 115 | + approvalLevel:'2' | ||
| 97 | } | 116 | } |
| 98 | - httpAction(httpurl,this.model,method).then((res)=>{ | 117 | + // return |
| 118 | + that.confirmLoading = true; | ||
| 119 | + // let httpurl = this.url.add; | ||
| 120 | + let method = 'post'; | ||
| 121 | + // if(!this.model.id){ | ||
| 122 | + // httpurl+=this.url.add; | ||
| 123 | + // method = 'post'; | ||
| 124 | + // }else{ | ||
| 125 | + // httpurl+=this.url.edit; | ||
| 126 | + // method = 'put'; | ||
| 127 | + // } | ||
| 128 | + httpAction(this.url.add,tempMOdel,method).then((res)=>{ | ||
| 99 | if(res.success){ | 129 | if(res.success){ |
| 100 | that.$message.success(res.message); | 130 | that.$message.success(res.message); |
| 101 | that.$emit('ok'); | 131 | that.$emit('ok'); |
| @@ -104,11 +134,20 @@ | @@ -104,11 +134,20 @@ | ||
| 104 | } | 134 | } |
| 105 | }).finally(() => { | 135 | }).finally(() => { |
| 106 | that.confirmLoading = false; | 136 | that.confirmLoading = false; |
| 137 | + this.close() | ||
| 107 | }) | 138 | }) |
| 108 | } | 139 | } |
| 109 | 140 | ||
| 110 | }) | 141 | }) |
| 111 | }, | 142 | }, |
| 143 | + close() { | ||
| 144 | + this.$emit('close'); | ||
| 145 | + this.visible = false; | ||
| 146 | + this.$refs.form.clearValidate(); | ||
| 147 | + }, | ||
| 148 | + handleCancel() { | ||
| 149 | + this.close() | ||
| 150 | + }, | ||
| 112 | } | 151 | } |
| 113 | } | 152 | } |
| 114 | </script> | 153 | </script> |
| @@ -197,7 +197,8 @@ export default { | @@ -197,7 +197,8 @@ export default { | ||
| 197 | },{ | 197 | },{ |
| 198 | value:'4', | 198 | value:'4', |
| 199 | label:"劳保" | 199 | label:"劳保" |
| 200 | - }] | 200 | + }], |
| 201 | + choose:"", | ||
| 201 | } | 202 | } |
| 202 | }, | 203 | }, |
| 203 | computed: { | 204 | computed: { |
| @@ -208,7 +209,7 @@ export default { | @@ -208,7 +209,7 @@ export default { | ||
| 208 | created() { | 209 | created() { |
| 209 | this.loadTree() | 210 | this.loadTree() |
| 210 | //备份model原始值 | 211 | //备份model原始值 |
| 211 | - // this.modelDefault = JSON.parse(JSON.stringify(this.model)) | 212 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| 212 | }, | 213 | }, |
| 213 | methods: { | 214 | methods: { |
| 214 | ...mapGetters(['nickname', 'avatar', 'userInfo']), | 215 | ...mapGetters(['nickname', 'avatar', 'userInfo']), |
| @@ -225,8 +226,8 @@ export default { | @@ -225,8 +226,8 @@ export default { | ||
| 225 | }, | 226 | }, |
| 226 | edit(record) { | 227 | edit(record) { |
| 227 | this.model = Object.assign({}, record) | 228 | this.model = Object.assign({}, record) |
| 228 | - console.log('this.model',this.model) | ||
| 229 | this.modelDefault = this.model | 229 | this.modelDefault = this.model |
| 230 | + this.choose = this.model.chooseStatus | ||
| 230 | if(!this.model.chooseStatus){ | 231 | if(!this.model.chooseStatus){ |
| 231 | this.model.chooseStatus = '0' | 232 | this.model.chooseStatus = '0' |
| 232 | } | 233 | } |
| @@ -248,7 +249,6 @@ export default { | @@ -248,7 +249,6 @@ export default { | ||
| 248 | }) | 249 | }) |
| 249 | }, | 250 | }, |
| 250 | onChange(e) { | 251 | onChange(e) { |
| 251 | - console.log('this.modelDefault',this.modelDefault) | ||
| 252 | if(!this.modelDefault.id){ | 252 | if(!this.modelDefault.id){ |
| 253 | if(e.target.value == '1'){ | 253 | if(e.target.value == '1'){ |
| 254 | this.model = {} | 254 | this.model = {} |
| @@ -258,13 +258,13 @@ export default { | @@ -258,13 +258,13 @@ export default { | ||
| 258 | this.model.chooseStatus = '0' | 258 | this.model.chooseStatus = '0' |
| 259 | } | 259 | } |
| 260 | }else if(this.modelDefault.id){ | 260 | }else if(this.modelDefault.id){ |
| 261 | - if(e.target.value == '1'){ | 261 | + |
| 262 | + if((this.choose == '0' && e.target.value == '1') || (this.choose == '1' && e.target.value == '0')){ | ||
| 262 | this.model = {} | 263 | this.model = {} |
| 263 | - this.model.chooseStatus = '1' | ||
| 264 | - }else if(e.target.value == '0'){ | 264 | + this.model.chooseStatus = e.target.value |
| 265 | + }else if((this.choose == '0' && e.target.value == '0') || (this.choose == '1' && e.target.value == '1')){ | ||
| 265 | this.model = this.modelDefault | 266 | this.model = this.modelDefault |
| 266 | - console.log(this.model) | ||
| 267 | - this.model.chooseStatus = '0' | 267 | + this.model.chooseStatus = e.target.value |
| 268 | } | 268 | } |
| 269 | } | 269 | } |
| 270 | 270 |
| @@ -6,12 +6,12 @@ | @@ -6,12 +6,12 @@ | ||
| 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.orderCompany"></j-input> | 9 | + <a-input placeholder="请输入订货单位" v-model="queryParam.orderCompany"></a-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"> |
| 13 | <a-form-item label="工作令"> | 13 | <a-form-item label="工作令"> |
| 14 | - <j-input placeholder="请输入工作令" v-model="queryParam.workOrder"></j-input> | 14 | + <a-input placeholder="请输入工作令" v-model="queryParam.workOrder"></a-input> |
| 15 | </a-form-item> | 15 | </a-form-item> |
| 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"> |
| @@ -14,12 +14,11 @@ | @@ -14,12 +14,11 @@ | ||
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
| 16 | 16 | ||
| 17 | - import ViewProductionPlanForm from './ViewProductionPlanForm' | ||
| 18 | import {querygx} from '@/api/manage' | 17 | import {querygx} from '@/api/manage' |
| 19 | export default { | 18 | export default { |
| 20 | name: 'ViewProductionPlanModal', | 19 | name: 'ViewProductionPlanModal', |
| 21 | components: { | 20 | components: { |
| 22 | - ViewProductionPlanForm | 21 | + |
| 23 | }, | 22 | }, |
| 24 | data () { | 23 | data () { |
| 25 | return { | 24 | return { |
| @@ -255,6 +255,15 @@ export default { | @@ -255,6 +255,15 @@ export default { | ||
| 255 | // 触发表单验证 | 255 | // 触发表单验证 |
| 256 | this.$refs.form.validate(valid => { | 256 | this.$refs.form.validate(valid => { |
| 257 | if (valid) { | 257 | if (valid) { |
| 258 | + if(!this.model.designPic && !this.model.designFile){ | ||
| 259 | + this.$message.warning("请上传生产图或生产图文件!") | ||
| 260 | + return | ||
| 261 | + } | ||
| 262 | + if(this.dataSource.lenth==0){ | ||
| 263 | + this.$message.warning("请新增材料及外购件!") | ||
| 264 | + return | ||
| 265 | + } | ||
| 266 | + return | ||
| 258 | this.model.biddingSqList = this.dataSource | 267 | this.model.biddingSqList = this.dataSource |
| 259 | // console.log(this.model) | 268 | // console.log(this.model) |
| 260 | // return | 269 | // return |
-
请 注册 或 登录 后发表评论