|
|
@ -4,7 +4,7 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="disableSubmit" @click="handleSubmit()">提交</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleSubmit()">提交</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -86,10 +86,8 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item> |
|
|
|
<el-radio-group v-model="temp.InsuranceStateKey" @change="InsuranceStateChange"> |
|
|
|
<el-radio label="0">否</el-radio> |
|
|
|
<el-radio label="1">是</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
<el-radio v-model="temp.InsuranceStateKey" label="0">否</el-radio> |
|
|
|
<el-radio v-model="temp.InsuranceStateKey" label="1">是</el-radio> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -138,18 +136,10 @@ export default { |
|
|
|
stateId: 0, |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
disableSubmit: false, |
|
|
|
location_list: [], |
|
|
|
targetLocation_list: [], |
|
|
|
imgList: [], // 附件上传 |
|
|
|
vinNo_list: [], // 车架号 |
|
|
|
InsuranceState_list: [{ |
|
|
|
key: '0', |
|
|
|
value: '否' |
|
|
|
}, { |
|
|
|
key: '1', |
|
|
|
value: '是' |
|
|
|
}], |
|
|
|
warehouwarehouse_list: [], // 存放地点 |
|
|
|
temp: { |
|
|
|
sid: '', |
|
|
@ -239,16 +229,6 @@ export default { |
|
|
|
this.temp.targetLocationSid = choosetItem[0].sid |
|
|
|
console.log('name:', this.temp.targetLocation, 'key:', this.temp.targetLocationKey, 'sid:', this.temp.targetLocationSid) |
|
|
|
}, |
|
|
|
InsuranceStateChange(val) { |
|
|
|
const choosetItem = this.InsuranceState_list.filter((item) => item.key == val) |
|
|
|
this.temp.InsuranceState = choosetItem[0].value |
|
|
|
if (this.temp.InsuranceStateKey == '0') { |
|
|
|
this.imgList = [] |
|
|
|
this.temp.policyImage = [] |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
console.log('name:', this.temp.InsuranceState, 'key:', this.temp.InsuranceStateKey) |
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].clearValidate() |
|
|
@ -277,12 +257,9 @@ export default { |
|
|
|
userSid: window.sessionStorage.getItem('userSid'), |
|
|
|
sid: sid |
|
|
|
} |
|
|
|
this.disableSubmit = true |
|
|
|
getCarTransferInfo(data).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.temp = res.data |
|
|
|
this.temp.InsuranceStateKey = res.data.insuranceStateKey |
|
|
|
this.temp.InsuranceState = res.data.insuranceState |
|
|
|
if (this.temp.policyImage.length > 0) { |
|
|
|
for (var i = 0; i < this.temp.policyImage.length; i++) { |
|
|
|
const imgName = this.temp.policyImage[i].split('/') |
|
|
@ -292,19 +269,9 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.temp.nodeState == '待提交' || this.temp.nodeState == '移库申请'){ |
|
|
|
this.disableSubmit = false |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getType() |
|
|
|
this.InsuranceState_list = [{ |
|
|
|
key: '0', |
|
|
|
value: '否' |
|
|
|
}, { |
|
|
|
key: '1', |
|
|
|
value: '是' |
|
|
|
}] |
|
|
|
}, |
|
|
|
getUrl() { |
|
|
|
if (this.temp.InsuranceStateKey == '1') { |
|
|
@ -350,13 +317,20 @@ export default { |
|
|
|
temporaryCard: '', |
|
|
|
policyImage: [] |
|
|
|
} |
|
|
|
this.disableSubmit = false |
|
|
|
this.imgList = [] |
|
|
|
this.vinNo_list = [] |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
// 提交添加数据 |
|
|
|
handleCreate() { |
|
|
|
if (this.temp.InsuranceStateKey == '0') { |
|
|
|
this.temp.InsuranceState = '否' |
|
|
|
this.temp.policyImage = [] |
|
|
|
this.imgList = [] |
|
|
|
} |
|
|
|
if (this.temp.InsuranceStateKey == '1') { |
|
|
|
this.temp.InsuranceState = '是' |
|
|
|
} |
|
|
|
this.getUrl() |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
@ -380,6 +354,14 @@ export default { |
|
|
|
}, |
|
|
|
handleSubmit() { |
|
|
|
const _this = this |
|
|
|
if (this.temp.InsuranceStateKey == '0') { |
|
|
|
this.temp.InsuranceState = '否' |
|
|
|
this.temp.policyImage = [] |
|
|
|
this.imgList = [] |
|
|
|
} |
|
|
|
if (this.temp.InsuranceStateKey == '1') { |
|
|
|
this.temp.InsuranceState = '是' |
|
|
|
} |
|
|
|
this.getUrl() |
|
|
|
this.$refs['dataForm'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|