|
...
|
...
|
@@ -5,37 +5,37 @@ |
|
|
|
<a-row>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="招标号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenderNumber">
|
|
|
|
<a-input v-model="model.tenderNumber" placeholder="请输入招标号" ></a-input>
|
|
|
|
<a-input v-model="model.tenderNumber" placeholder="请输入招标号"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customer">
|
|
|
|
<a-input v-model="model.customer" placeholder="请输入客户" ></a-input>
|
|
|
|
<a-input v-model="model.customer" placeholder="请输入客户"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="客户采购" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="procurement">
|
|
|
|
<a-input v-model="model.procurement" placeholder="请输入客户采购" ></a-input>
|
|
|
|
<a-input v-model="model.procurement" placeholder="请输入客户采购"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="客户料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
|
|
|
|
<a-input v-model="model.partNumber" placeholder="请输入客户料号" ></a-input>
|
|
|
|
<a-input v-model="model.partNumber" placeholder="请输入客户料号"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">
|
|
|
|
<a-input v-model="model.description" placeholder="请输入物料描述" ></a-input>
|
|
|
|
<a-input v-model="model.description" placeholder="请输入物料描述"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productname">
|
|
|
|
<a-input v-model="model.productname" placeholder="请输入品名" ></a-input>
|
|
|
|
<a-input v-model="model.productname" placeholder="请输入品名"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
|
|
|
|
<a-input v-model="model.specifications" placeholder="请输入规格" ></a-input>
|
|
|
|
<a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
...
|
...
|
@@ -45,12 +45,12 @@ |
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
|
|
|
|
<a-input v-model="model.danwei" placeholder="请输入计量单位" ></a-input>
|
|
|
|
<a-input v-model="model.danwei" placeholder="请输入计量单位"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="客户需求单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="company">
|
|
|
|
<a-input v-model="model.company" placeholder="请输入客户需求单位" ></a-input>
|
|
|
|
<a-input v-model="model.company" placeholder="请输入客户需求单位"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
...
|
...
|
@@ -60,22 +60,22 @@ |
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="备注(品牌要求)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
|
|
|
|
<a-input v-model="model.notes" placeholder="请输入备注(品牌要求)" ></a-input>
|
|
|
|
<a-input v-model="model.notes" placeholder="请输入备注(品牌要求)"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="客户设计" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="design">
|
|
|
|
<a-input v-model="model.design" placeholder="请输入客户设计" ></a-input>
|
|
|
|
<a-input v-model="model.design" placeholder="请输入客户设计"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
|
|
|
|
<a-input v-model="model.phone" placeholder="请输入联系方式" ></a-input>
|
|
|
|
<a-input v-model="model.phone" placeholder="请输入联系方式"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="图纸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture">
|
|
|
|
<a-input v-model="model.picture" placeholder="请输入图纸" ></a-input>
|
|
|
|
<a-input v-model="model.picture" placeholder="请输入图纸"></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
...
|
...
|
@@ -85,26 +85,23 @@ |
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
|
|
|
|
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'TblTradBaseForm',
|
|
|
|
components: {
|
|
|
|
},
|
|
|
|
components: {},
|
|
|
|
props: {
|
|
|
|
//表单禁用
|
|
|
|
disabled: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
required: false
|
|
|
|
}
|
|
|
|
required: false,
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
model:{
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
model: {},
|
|
|
|
labelCol: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 5 },
|
|
...
|
...
|
@@ -115,60 +112,72 @@ |
|
|
|
},
|
|
|
|
confirmLoading: false,
|
|
|
|
validatorRules: {
|
|
|
|
// tenderNumber: [{ required: true, message: '请输入姓名!' }],
|
|
|
|
// customer: [{ required: true, message: '请输入身份证号!' }],
|
|
|
|
// procurement: [{ required: true, message: '请输入银行卡号!' }],
|
|
|
|
// partNumber: [{ required: true, message: '请输入基本工资!' }],
|
|
|
|
// description: [{ required: true, message: '请输入工作职位!' }],
|
|
|
|
// productname: [{ required: true, message: '请输入餐费单价!' }],
|
|
|
|
// specifications: [{ required: true, message: '请输入社保公司!' }],
|
|
|
|
// num: [{ required: true, message: '请输入社保个人!' }],
|
|
|
|
// danwei: [{ required: true, message: '请输入工时单价!' }],
|
|
|
|
// company: [{ required: true, message: '请输入比例!' }],
|
|
|
|
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
add: "/trad/tblTradBase/add",
|
|
|
|
edit: "/trad/tblTradBase/edit",
|
|
|
|
queryById: "/trad/tblTradBase/queryById"
|
|
|
|
}
|
|
|
|
add: '/trad/tblTradBase/add',
|
|
|
|
edit: '/trad/tblTradBase/edit',
|
|
|
|
queryById: '/trad/tblTradBase/queryById',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
formDisabled(){
|
|
|
|
formDisabled() {
|
|
|
|
return this.disabled
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created () {
|
|
|
|
created() {
|
|
|
|
//备份model原始值
|
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
add () {
|
|
|
|
this.edit(this.modelDefault);
|
|
|
|
add() {
|
|
|
|
this.edit(this.modelDefault)
|
|
|
|
},
|
|
|
|
edit (record) {
|
|
|
|
this.model = Object.assign({}, record);
|
|
|
|
this.visible = true;
|
|
|
|
edit(record) {
|
|
|
|
this.model = Object.assign({}, record)
|
|
|
|
this.visible = true
|
|
|
|
},
|
|
|
|
submitForm () {
|
|
|
|
const that = this;
|
|
|
|
submitForm() {
|
|
|
|
const that = this
|
|
|
|
// 触发表单验证
|
|
|
|
this.$refs.form.validate(valid => {
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
that.confirmLoading = true;
|
|
|
|
let httpurl = '';
|
|
|
|
let method = '';
|
|
|
|
if(!this.model.id){
|
|
|
|
httpurl+=this.url.add;
|
|
|
|
method = 'post';
|
|
|
|
}else{
|
|
|
|
httpurl+=this.url.edit;
|
|
|
|
method = 'put';
|
|
|
|
that.confirmLoading = true
|
|
|
|
let httpurl = ''
|
|
|
|
let method = ''
|
|
|
|
if (!this.model.id) {
|
|
|
|
httpurl += this.url.add
|
|
|
|
method = 'post'
|
|
|
|
} else {
|
|
|
|
httpurl += this.url.edit
|
|
|
|
method = 'put'
|
|
|
|
}
|
|
|
|
httpAction(httpurl,this.model,method).then((res)=>{
|
|
|
|
if(res.success){
|
|
|
|
that.$message.success(res.message);
|
|
|
|
that.$emit('ok');
|
|
|
|
}else{
|
|
|
|
that.$message.warning(res.message);
|
|
|
|
httpAction(httpurl, this.model, method)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
that.$message.success(res.message)
|
|
|
|
that.$emit('ok')
|
|
|
|
} else {
|
|
|
|
that.$message.warning(res.message)
|
|
|
|
}
|
|
|
|
}).finally(() => {
|
|
|
|
that.confirmLoading = false;
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
that.confirmLoading = false
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script> |
|
|
\ No newline at end of file |
...
|
...
|
|