| | |
| | | <!----> |
| | | <a-input @click="openModal" placeholder="请点击选择车间" v-model="textVals" readOnly :disabled="disabled"> |
| | | <a-icon slot="prefix" type="cluster" title="车间选择控件"/> |
| | | <a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/> |
| | | <a-icon v-if="storeVals&&!disabled" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/> |
| | | </a-input> |
| | | <j-select-equipment-production-modal |
| | | ref="innerDepartSelectModal" |
| | |
| | | this.$refs.modalForm.edit(record); |
| | | this.$refs.modalForm.title = "编辑"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | |
| | | }, |
| | | handleAdd: function () { |
| | | this.$refs.modalForm.add(); |
| | |
| | | :title="title" |
| | | :maskClosable="true" |
| | | :width="drawerWidth" |
| | | @cancel="handleCancel" |
| | | @cancel="visible=false" |
| | | :visible="visible" |
| | | :footer="null" |
| | | style="height: 100%;overflow: auto;padding-bottom: 53px;"> |
| | |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车间分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> |
| | | <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'请选择车间!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> |
| | | |
| | | |
| | | |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-model-item> |
| | | |
| | |
| | | // } |
| | | // }) |
| | | // }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | // validatequipmentId(rule, value, callback){ |
| | | // if(!value){ |
| | | // callback() |
| | |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | vacationDate:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请选择休假时间" |
| | | }, |
| | | ], |
| | | }, |
| | | vacationType:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请选择假期类型" |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | |
| | | url: { |
| | |
| | | }, |
| | | created() { |
| | | }, |
| | | |
| | | methods: { |
| | | // disabledDate(current){ |
| | | // //Can not slect days before today and today |
| | |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | vacationDate:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请选择休假时间" |
| | | }, |
| | | ], |
| | | }, |
| | | vacationType:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请选择假期类型" |
| | | }, |
| | | ], |
| | | }, |
| | | // mdcRepairType:{ |
| | | // rules:[ |
| | | // { |
| | |
| | | <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planCloseType"> |
| | | <j-dict-select-tag :readOnly="disableSubmit" placeholder="请选择类型" |
| | | :triggerChange="true" dictCode="mdc_plan_type " |
| | | v-model="model.planCloseType" allow-clear/> |
| | | |
| | | v-model="model.planCloseType" allow-clear /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | planCloseType:[ |
| | | {required: true,message:'请选择类型!'} |
| | | ], |
| | | planCloseTimeType:[ |
| | | {required: true,message:'请选择时间类型!'} |
| | | ], |
| | | planCloseTimeLong:[ |
| | | {required: true,message:'请输入时长!'} |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/mdc/mdcPlanClose/add", |
| | |
| | | textStyle:{ |
| | | color:'#000', |
| | | }, |
| | | formatter:"时长:{c}H" |
| | | // formatter:"时长:{c}H", |
| | | formatter:params=>String(params.value).length==2?`时长:${String(params.value).slice(1)}H`:`时长:${String(params.value)}H` |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | |
| | | // }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: "{a} <br/>{b} : {c} ({d}%)" |
| | | // formatter: "{a} <br/>{b} : {c} ({d}%)", |
| | | formatter:params=>String(params.value).length==2?`${params.seriesName}<br/>${params.name}:${String(params.value).slice(1)}(${params.percent}%)`:`${params.seriesName}<br/>${params.name}:${params.value}(${params.percent}%)` |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: '{b}\n{c}' |
| | | // formatter: '{b}\n{c}', |
| | | formatter:params=>String(params.value).length==2?params.name+String(params.value).slice(1):params.name+String(params.value) |
| | | } |
| | | } |
| | | }, |
| | |
| | | // }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: "{a} <br/>{b} : {c} ({d}%)" |
| | | // formatter: "{a} <br/>{b} : {c} ({d}%)", |
| | | formatter:params=>String(params.value).length==2?`${params.seriesName}<br/>${params.name}:${String(params.value).slice(1)}(${params.percent}%)`:`${params.seriesName}<br/>${params.name}:${params.value}(${params.percent}%)` |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: '{b}\n{c}' |
| | | // formatter: '{b}\n{c}', |
| | | formatter:params=>String(params.value).length==2?params.name+String(params.value).slice(1):params.name+String(params.value) |
| | | } |
| | | } |
| | | }, |
| | |
| | | textStyle:{ |
| | | color:'#000', |
| | | }, |
| | | formatter:"时长:{c}H" |
| | | // formatter:"时长:{c}H", |
| | | formatter:params=>String(params.value).length==2?`时长:${String(params.value).slice(1)}H`:`时长:${String(params.value)}H` |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | |
| | | textStyle:{ |
| | | color:'#000', |
| | | }, |
| | | formatter:"时长:{c}H" |
| | | // formatter:"时长:{c}H", |
| | | formatter:params=>String(params.value).length==2?`时长:${String(params.value).slice(1)}H`:`时长:${String(params.value)}H` |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | |
| | | textStyle:{ |
| | | color:'#000', |
| | | }, |
| | | formatter:"时长:{c}H" |
| | | // formatter:"时长:{c}H", |
| | | formatter:params=>String(params.value).length==2?`时长:${String(params.value).slice(1)}H`:`时长:${String(params.value)}H` |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | noplanType:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请选择类型" |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | |
| | | url: { |
| | |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | noplanType:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请选择类型" |
| | | }, |
| | | ], |
| | | }, |
| | | // mdcRepairType:{ |
| | | // rules:[ |
| | | // { |
| | |
| | | }, |
| | | confirmLoading: false, form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | // shiftId:{ |
| | | // rules: [{ |
| | | // required: true, message: '请选择班制!', |
| | | // }], |
| | | // }, |
| | | equipmentId:{ |
| | | rules:[ |
| | | { |
| | | required:true,message:'请选择设备组!' |
| | | } |
| | | ] |
| | | }, |
| | | shiftId:{ |
| | | rules: [{ |
| | | required: true, message: '请选择班制!', |
| | | }], |
| | | } |
| | | }, |
| | | url: { |
| | | add: '/mdc/mdcDeviceCalendar/add', |
| | |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | |
| | | formData.dateList = this.sendDte |
| | | postAction(this.url.settingCalendar, formData).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message) |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | if(formData.dateList&&formData.dateList.length>0){ |
| | | postAction(this.url.settingCalendar, formData).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message) |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | }else{ |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:'请选择生效时间!' |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success("保存成功") |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | |
| | | let _this = this |
| | | putAction(this.url.changeStatus, { id: id, status: status }).then((res) => { |
| | | if (res.success) { |
| | | _this.$message.success('操作成功!') |
| | | _this.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }) |
| | | _this.loadData() |
| | | } else { |
| | | _this.$message.warning('操作失败!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |