|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card class="box-card">
|
|
|
|
|
<div slot="header" class="clearfix">
|
|
|
|
|
<span style="font-size: 20px">基本信息</span>
|
|
|
|
|
</div>
|
|
|
|
|
<el-form
|
|
|
|
|
ref="testForm"
|
|
|
|
|
:model="formData"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
label-width="120px"
|
|
|
|
|
label-position="right"
|
|
|
|
|
:validate-on-rule-change="false"
|
|
|
|
|
class="vd-form-three"
|
|
|
|
|
>
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="零件号:" prop="partCode">
|
|
|
|
|
<el-input v-model="formData.partCode" disabled placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="零件名称:" prop="partName">
|
|
|
|
|
<el-input v-model="formData.partName" disabled placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="产品型号:" prop="productType">
|
|
|
|
|
<el-input v-model="formData.productType" placeholder="请输入" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '烧结'">
|
|
|
|
|
<el-form-item label="是否为玻璃饼:" prop="isGlassCake">
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="formData.isGlassCake"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
active-color="#13ce66"
|
|
|
|
|
inactive-color="#ff4949"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '烧结'">
|
|
|
|
|
<el-form-item label="是否印字:" prop="printing">
|
|
|
|
|
<el-radio-group v-model="formData.printing" v-if="!formData.isGlassCake">
|
|
|
|
|
<el-radio value="1">否</el-radio>
|
|
|
|
|
<el-radio value="2">单</el-radio>
|
|
|
|
|
<el-radio value="3">双</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
<el-radio-group v-model="formData.printing" v-if="formData.isGlassCake">
|
|
|
|
|
<el-radio value="2">是</el-radio>
|
|
|
|
|
<el-radio value="1">否</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '烧结' && formData.isGlassCake">
|
|
|
|
|
<el-form-item label="材料:" prop="material">
|
|
|
|
|
<el-input v-model="formData.material" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '烧结' && formData.isGlassCake">
|
|
|
|
|
<el-form-item label="粉重:" prop="powderWeight">
|
|
|
|
|
<el-input v-model="formData.powderWeight" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '烧结' && formData.isGlassCake">
|
|
|
|
|
<el-form-item label="成型厚度:" prop="formingThickness">
|
|
|
|
|
<el-input v-model="formData.formingThickness" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '烧结' && formData.isGlassCake">
|
|
|
|
|
<el-form-item label="面积(dm²):" prop="area">
|
|
|
|
|
<el-input v-model="formData.area" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="硬度:" prop="hardness">
|
|
|
|
|
<el-input v-model="formData.hardness" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="材料:" prop="material">
|
|
|
|
|
<el-input v-model="formData.material" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col
|
|
|
|
|
:span="8"
|
|
|
|
|
v-if="partType == '热表' || (partType == '烧结' && formData.isGlassCake)"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="物料编码:" prop="wuliaobianma">
|
|
|
|
|
<el-select v-model="value" placeholder="请选择" style="width: 250px">
|
|
|
|
|
<el-option label="物料一" value="1" />
|
|
|
|
|
<el-option label="物料二" value="2" />
|
|
|
|
|
<el-option label="物料三" value="3" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="镀种1:" prop="plate">
|
|
|
|
|
<el-select v-model="formData.plate" placeholder="请选择" style="width: 250px">
|
|
|
|
|
<el-option label="镀种一" value="1" />
|
|
|
|
|
<el-option label="镀种二" value="2" />
|
|
|
|
|
<el-option label="镀种三" value="3" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="镀层代号1:" prop="plateCode">
|
|
|
|
|
<el-input v-model="formData.plateCode" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="面积1(dm²):" prop="area">
|
|
|
|
|
<el-input v-model="formData.area" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="镀种2:" prop="plateTwo">
|
|
|
|
|
<el-select v-model="formData.plateTwo" placeholder="请选择" style="width: 250px">
|
|
|
|
|
<el-option label="镀种一" value="1" />
|
|
|
|
|
<el-option label="镀种二" value="2" />
|
|
|
|
|
<el-option label="镀种三" value="3" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="镀层代号2:" prop="plateCodeTwo">
|
|
|
|
|
<el-input v-model="formData.plateCodeTwo" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="面积2(dm²):" prop="areaTwo">
|
|
|
|
|
<el-input v-model="formData.areaTwo" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="partType == '热表'">
|
|
|
|
|
<el-form-item label="镀层厚度:" prop="plateThickness">
|
|
|
|
|
<el-input v-model="formData.plateThickness" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="产品应用领域:" prop="productApplicationArea">
|
|
|
|
|
<el-input v-model="formData.productApplicationArea" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
<el-form-item label="工艺路线:" prop="craftWay">
|
|
|
|
|
{{ formData.craftWay }}
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="有效期:" prop="periodOfValidity">
|
|
|
|
|
<el-radio-group v-model="formData.periodOfValidity" @change="periodOfValidityFn">
|
|
|
|
|
<el-radio value="1" size="large">长期有效</el-radio>
|
|
|
|
|
<el-radio value="2" size="large">自定义</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="有效周期(天):" prop="expirationPeriod">
|
|
|
|
|
<el-input-number
|
|
|
|
|
:max="100000"
|
|
|
|
|
:min="0"
|
|
|
|
|
v-model="formData.expirationPeriod"
|
|
|
|
|
precision="0"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
style="width: 250px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="到期提醒(天):" prop="advanceRemind">
|
|
|
|
|
<el-input-number
|
|
|
|
|
:max="100000"
|
|
|
|
|
:min="0"
|
|
|
|
|
v-model="formData.advanceRemind"
|
|
|
|
|
precision="0"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
style="width: 250px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="涂色标个数:" prop="tsbNum">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="formData.tsbNum"
|
|
|
|
|
:min="1"
|
|
|
|
|
:max="10"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="涂色带个数:" prop="tsdNum">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="formData.tsdNum"
|
|
|
|
|
:min="1"
|
|
|
|
|
:max="10"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="涂箭头个数:" prop="tjtNum">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="formData.tjtNum"
|
|
|
|
|
:min="1"
|
|
|
|
|
:max="10"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
<el-form-item label="色标色带:" prop="memo">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.memo"
|
|
|
|
|
:rows="3"
|
|
|
|
|
type="textarea"
|
|
|
|
|
maxlength="150"
|
|
|
|
|
show-word-limit
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
<el-form-item label="关键信息:" prop="keyInfo">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.keyInfo"
|
|
|
|
|
type="textarea"
|
|
|
|
|
maxlength="150"
|
|
|
|
|
show-word-limit
|
|
|
|
|
rows="3"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="24">
|
|
|
|
|
<el-col
|
|
|
|
|
:span="24"
|
|
|
|
|
v-if="partType == '热表' || (partType == '烧结' && !formData.isGlassCake)"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="工艺校验:" prop="sinTer">
|
|
|
|
|
<el-checkbox v-model="formData.goldMark" v-if="partType == '热表'"
|
|
|
|
|
>镀金标识</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
<el-checkbox v-model="formData.markingsTest" @change="setDataLocal"
|
|
|
|
|
>涂色标</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
<el-checkbox
|
|
|
|
|
v-model="formData.fluorescenceCheck"
|
|
|
|
|
@change="setDataLocal"
|
|
|
|
|
v-if="partType == '热表'"
|
|
|
|
|
>荧光检</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
<el-checkbox
|
|
|
|
|
v-model="formData.hotDispose"
|
|
|
|
|
@change="setDataLocal"
|
|
|
|
|
v-if="partType == '热表'"
|
|
|
|
|
>热处理检验</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
<el-checkbox
|
|
|
|
|
v-model="formData.inkjetPrinting"
|
|
|
|
|
@change="setDataLocal"
|
|
|
|
|
v-if="partType == '热表'"
|
|
|
|
|
>喷码</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card
|
|
|
|
|
class="box-card"
|
|
|
|
|
v-if="formData.isSintering == '0' && !formData.isGlassCake"
|
|
|
|
|
style="margin-top: 24px"
|
|
|
|
|
>
|
|
|
|
|
<div slot="header" class="clearfix">
|
|
|
|
|
<span style="font-size: 20px">子件信息</span>
|
|
|
|
|
</div>
|
|
|
|
|
<avue-crud
|
|
|
|
|
:option="option"
|
|
|
|
|
:table-loading="loading"
|
|
|
|
|
:data="data"
|
|
|
|
|
v-model="form"
|
|
|
|
|
v-model:page="page"
|
|
|
|
|
ref="crud"
|
|
|
|
|
@search-change="searchChange"
|
|
|
|
|
@search-reset="searchReset"
|
|
|
|
|
@selection-change="selectionChange"
|
|
|
|
|
@current-change="currentChange"
|
|
|
|
|
@size-change="sizeChange"
|
|
|
|
|
@refresh-change="refreshChange"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
</avue-crud>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { getPartDetail,authorizedAccomplish } from '@/api/processManagement/taskProcessing';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
|
props: {
|
|
|
|
|
partType: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
partId: {
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
|
|
|
|
childPage: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
psId: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
|
|
|
|
rowObject: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
|
|
|
|
dsPartInfo: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
var checkCode = (rule, value, callback) => {
|
|
|
|
|
this.$ajax
|
|
|
|
|
.post('dsPart/checkCode', {
|
|
|
|
|
partId: this.formData.partId,
|
|
|
|
|
partCode: value,
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.data) {
|
|
|
|
|
callback(new Error(this.$t('global.duplicateCode')));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const proportionNum = (rule, value, callback) => {
|
|
|
|
|
if (value === 0) {
|
|
|
|
|
callback(new Error(this.$t('输入的值必须大于0')));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return {
|
|
|
|
|
disabled: false,
|
|
|
|
|
formData: {
|
|
|
|
|
sinTer: false,
|
|
|
|
|
goldMark: false,
|
|
|
|
|
periodOfValidity: '1',
|
|
|
|
|
youxiaozhouqi: '',
|
|
|
|
|
expirationPeriod: '',
|
|
|
|
|
fenzhong: '',
|
|
|
|
|
},
|
|
|
|
|
validateObj: {
|
|
|
|
|
fluorescenceCheck: false,
|
|
|
|
|
inkjetPrinting: false,
|
|
|
|
|
hotDispose: false,
|
|
|
|
|
},
|
|
|
|
|
notSinTer: true,
|
|
|
|
|
notGlassCake: true,
|
|
|
|
|
tsbNum: null,
|
|
|
|
|
tsdNum: null,
|
|
|
|
|
tjtNum: null,
|
|
|
|
|
numOptions: [],
|
|
|
|
|
rules: {
|
|
|
|
|
plate: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
material: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
isGlassCake: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
|
|
printing: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
|
|
dueDate: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
|
|
partCode: [{ required: true ,message: '请选择', trigger: 'blur' }],
|
|
|
|
|
partName: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
|
|
craftWay: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
area: [
|
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' },
|
|
|
|
|
{ validator: proportionNum, trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
expirationPeriod: [{ required: false, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
plate: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
material: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
mianji1: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
periodOfValidity: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
|
|
youxiaozhouqi: [{ required: false, message: '请选择', trigger: 'blur' }],
|
|
|
|
|
fenzhong: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
chengxinghoudu: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
},
|
|
|
|
|
submitLoading: false,
|
|
|
|
|
data: [],
|
|
|
|
|
option: {
|
|
|
|
|
tip: false,
|
|
|
|
|
simplePage: false,
|
|
|
|
|
searchShow: true,
|
|
|
|
|
searchMenuSpan: 6,
|
|
|
|
|
dialogWidth: '60%',
|
|
|
|
|
border: true,
|
|
|
|
|
selection: false,
|
|
|
|
|
viewBtn: true,
|
|
|
|
|
menuWidth: 240,
|
|
|
|
|
dialogClickModal: false,
|
|
|
|
|
excelBtn: true,
|
|
|
|
|
viewBtn: false,
|
|
|
|
|
editBtnText: '编辑',
|
|
|
|
|
refreshBtn: false,
|
|
|
|
|
searchShowBtn: false,
|
|
|
|
|
gridBtn: false,
|
|
|
|
|
menu: false,
|
|
|
|
|
header: false,
|
|
|
|
|
index: true,
|
|
|
|
|
searchLabelPosition: 'left',
|
|
|
|
|
searchGutter: 24,
|
|
|
|
|
searchSpan: 6,
|
|
|
|
|
menuAlign: 'left',
|
|
|
|
|
gridBtn: false,
|
|
|
|
|
searchMenuPosition: 'right',
|
|
|
|
|
addBtnIcon: ' ',
|
|
|
|
|
viewBtnIcon: ' ',
|
|
|
|
|
delBtnIcon: ' ',
|
|
|
|
|
editBtnIcon: ' ',
|
|
|
|
|
align: 'center',
|
|
|
|
|
column: [
|
|
|
|
|
{
|
|
|
|
|
label: '零件号',
|
|
|
|
|
prop: 'subCode',
|
|
|
|
|
search: false,
|
|
|
|
|
sortable: true,
|
|
|
|
|
overHidden: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '零件名称',
|
|
|
|
|
prop: 'subName',
|
|
|
|
|
search: false,
|
|
|
|
|
sortable: true,
|
|
|
|
|
overHidden: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '产品型号',
|
|
|
|
|
prop: 'productType',
|
|
|
|
|
search: false,
|
|
|
|
|
sortable: true,
|
|
|
|
|
overHidden: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '数量',
|
|
|
|
|
prop: 'quota',
|
|
|
|
|
search: false,
|
|
|
|
|
sortable: true,
|
|
|
|
|
overHidden: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '总面积',
|
|
|
|
|
prop: 'quota',
|
|
|
|
|
search: false,
|
|
|
|
|
sortable: true,
|
|
|
|
|
overHidden: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '零件类型',
|
|
|
|
|
prop: 'productType',
|
|
|
|
|
search: false,
|
|
|
|
|
sortable: true,
|
|
|
|
|
overHidden: true,
|
|
|
|
|
type: 'select',
|
|
|
|
|
cell: true,
|
|
|
|
|
dicData: [
|
|
|
|
|
{
|
|
|
|
|
label: '插针',
|
|
|
|
|
value: '1',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '壳体',
|
|
|
|
|
value: '2',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '石墨模',
|
|
|
|
|
value: '5',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '自制玻璃饼',
|
|
|
|
|
value: '3',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '其他',
|
|
|
|
|
value: '4',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.disabled = this.dialogType == 'view' ? true : false;
|
|
|
|
|
// this.formData = this.dsPartInfo;
|
|
|
|
|
this.getPartDetails();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 获取零件信息详情数据
|
|
|
|
|
getPartDetails() {
|
|
|
|
|
getPartDetail(this.partId).then(res => {
|
|
|
|
|
this.formData = res.data.data.dsPartEntity;
|
|
|
|
|
this.data = res.data.data.dsPartEntities
|
|
|
|
|
if (res.data.data.dsPartEntity.isGlassCake === '0') {
|
|
|
|
|
this.formData.isGlassCake = false;
|
|
|
|
|
} else {
|
|
|
|
|
this.formData.isGlassCake = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//有效期切换
|
|
|
|
|
periodOfValidityFn(value) {
|
|
|
|
|
if (value == 2) {
|
|
|
|
|
this.rules.youxiaozhouqi = [{ required: true, message: '请输入', trigger: 'blur' }];
|
|
|
|
|
this.rules.expirationPeriod = [{ required: true, message: '请输入', trigger: 'blur' }];
|
|
|
|
|
} else {
|
|
|
|
|
this.rules.youxiaozhouqi = [{ required: false, message: '请输入', trigger: 'blur' }];
|
|
|
|
|
this.rules.expirationPeriod = [{ required: false, message: '请输入', trigger: 'blur' }];
|
|
|
|
|
}
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.testForm.clearValidate(); // 清空之前的校验结果
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
clear() {
|
|
|
|
|
this.formData = {};
|
|
|
|
|
this.$refs.form.resetFields();
|
|
|
|
|
},
|
|
|
|
|
loadData(partId) {
|
|
|
|
|
this.formData = { sinTer: false, goldMark: false };
|
|
|
|
|
this.notSinTer = true;
|
|
|
|
|
this.notGlassCake = true;
|
|
|
|
|
this.$refs.form.resetFields();
|
|
|
|
|
// if (partId) {
|
|
|
|
|
// this.$ajax.get('dsPart/getByKey/' + partId).then((res) => {
|
|
|
|
|
// if (this.$ifAjax(res)) {
|
|
|
|
|
// this.formData = res.data;
|
|
|
|
|
|
|
|
|
|
// if (this.rowObject != null) {
|
|
|
|
|
// // 由子件信息页面编辑带入信息
|
|
|
|
|
// this.formData.partName = this.rowObject.subName; // 零件名称=子件名称
|
|
|
|
|
// this.formData.productType = this.rowObject.productType; // 产品型号
|
|
|
|
|
// this.formData.material = this.rowObject.material; // 材料
|
|
|
|
|
// this.formData.area = this.rowObject.area; // 面积(dm²)
|
|
|
|
|
// this.formData.plate = this.rowObject.plate; // 镀种
|
|
|
|
|
// this.formData.plateCode = this.rowObject.plateCode; // 镀层代号
|
|
|
|
|
// this.formData.plateThickness = this.rowObject.plateThickness; // 镀层厚度
|
|
|
|
|
// if (this.rowObject.sinTerType == 3) {
|
|
|
|
|
// this.formData.glassCake = true;
|
|
|
|
|
// } else if (this.rowObject.sinTerType == 5) {
|
|
|
|
|
// this.formData.sinTer = true;
|
|
|
|
|
// } else {
|
|
|
|
|
// this.formData.glassCake = false;
|
|
|
|
|
// this.formData.sinTer = false;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// const craftWay = this.formData.craftWay;
|
|
|
|
|
// if (
|
|
|
|
|
// craftWay.indexOf('涂色标') !== -1 ||
|
|
|
|
|
// craftWay.indexOf('涂色带') !== -1
|
|
|
|
|
// ) {
|
|
|
|
|
// this.formData.markingsTest = true;
|
|
|
|
|
// }
|
|
|
|
|
// if (craftWay.indexOf('热') !== -1) {
|
|
|
|
|
// this.validateObj.hotDispose = true;
|
|
|
|
|
// }
|
|
|
|
|
// if (craftWay.indexOf('荧光检') !== -1) {
|
|
|
|
|
// this.validateObj.fluorescenceCheck = true;
|
|
|
|
|
// }
|
|
|
|
|
// if (craftWay.indexOf('喷码') !== -1) {
|
|
|
|
|
// this.validateObj.inkjetPrinting = true;
|
|
|
|
|
// }
|
|
|
|
|
// this.setDataLocal();
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
this.$refs.craftEdit.getData(partId, true);
|
|
|
|
|
},
|
|
|
|
|
setDataLocal() {
|
|
|
|
|
this.$setItem('零件信息信息验证', this.validateObj);
|
|
|
|
|
},
|
|
|
|
|
// validatorMethod(rule, value, callback) {
|
|
|
|
|
// const regex = /^[0-9]\d*$/;
|
|
|
|
|
// if (!value) {
|
|
|
|
|
// callback(new Error('请输入正整数'));
|
|
|
|
|
// } else if (!regex.test(value)) {
|
|
|
|
|
// callback(new Error('请输入正整数'));
|
|
|
|
|
// } else {
|
|
|
|
|
// callback();
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
submit(flag) {
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
|
console.log(98989, this.formData);
|
|
|
|
|
this.$refs.testForm.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
let isReturn = false;
|
|
|
|
|
if (this.formData.plateCode || this.formData.plateThickness) {
|
|
|
|
|
if (!this.formData.plateGoodsCode) {
|
|
|
|
|
isReturn = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (isReturn && this.notSinTer) {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
return this.$message.warning('请选择镀层物料');
|
|
|
|
|
}
|
|
|
|
|
if (this.formData.craftWay.indexOf('涂色') != -1) {
|
|
|
|
|
if (
|
|
|
|
|
this.formData.tsdNum === null &&
|
|
|
|
|
this.formData.tsbNum === null &&
|
|
|
|
|
this.formData.tjtNum === null
|
|
|
|
|
) {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
return this.$message.warning('一级路线包含涂色,请填写涂色数据');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.formData.childPage = this.childPage;
|
|
|
|
|
this.formData.psId = this.psId;
|
|
|
|
|
|
|
|
|
|
authorizedAccomplish( {dsPart:this.formData,partList:this.data}).then(res=>{
|
|
|
|
|
console.log('9999res',res)
|
|
|
|
|
this.cancel(flag, res.data);
|
|
|
|
|
})
|
|
|
|
|
// this.$ajax.post('dsPart/addOrEdit', this.formData).then((res) => {
|
|
|
|
|
// if (this.$ifAjax(res)) {
|
|
|
|
|
// this.$message.success(
|
|
|
|
|
// this.$t('videaVueLib.publics.message.success')
|
|
|
|
|
// );
|
|
|
|
|
// this.cancel(flag, res.data);
|
|
|
|
|
// this.$refs.craftEdit.getData(this.partId, true);
|
|
|
|
|
// }
|
|
|
|
|
// this.submitLoading = false;
|
|
|
|
|
// });
|
|
|
|
|
} else {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
cancel(flag, dsPart) {
|
|
|
|
|
this.$emit('cancelClose', flag, dsPart);
|
|
|
|
|
// if (!flag) {
|
|
|
|
|
// this.$refs.craftEdit.refreshLoad();
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.clearfix {
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.auto-fit {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.vd-form-three {
|
|
|
|
|
.el-form-item {
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
.el-input,
|
|
|
|
|
.el-select,
|
|
|
|
|
.el-input-number,
|
|
|
|
|
.el-date-editor.el-input__wrapper {
|
|
|
|
|
width: 250px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|