|
|
@ -179,11 +179,32 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<el-dialog :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false"> |
|
|
|
<el-form class="formadd" :model="temp"> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="9" class="tleftb"> |
|
|
|
<span>是否修改客户编码</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="15"> |
|
|
|
<el-form-item> |
|
|
|
<el-radio-group v-model="temp.isUpdateOrInsertCrm"> |
|
|
|
<el-radio label="是">是</el-radio> |
|
|
|
<el-radio label="否">否</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button> |
|
|
|
<el-button size="small" @click="handleColse">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { vehicleOutLibrary } from '@/api/cheliang/basevehicle' |
|
|
|
import { vehicleOutLibrary, isUpdateOrInsertCrm } from '@/api/cheliang/basevehicle' |
|
|
|
import { selectOrgList, selectCustomerList, selectMiddleList } from '@/api/cheliang/dictcommons' |
|
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
|
|
|
@ -204,6 +225,7 @@ export default { |
|
|
|
// } |
|
|
|
// } |
|
|
|
return { |
|
|
|
dialogVisible: false, |
|
|
|
disabledBtn: false, |
|
|
|
temp: { |
|
|
|
vinNo: '', |
|
|
@ -233,7 +255,8 @@ export default { |
|
|
|
type: '', // 出库类型 |
|
|
|
typeKey: '', // 出库类型Key |
|
|
|
createOrgSid: '', |
|
|
|
remarks: '' |
|
|
|
remarks: '', |
|
|
|
isUpdateOrInsertCrm: '' |
|
|
|
}, |
|
|
|
payType_list: [], // 出库类型 |
|
|
|
org_list: [], // 销售部门 |
|
|
@ -355,10 +378,12 @@ export default { |
|
|
|
}).then(() => { |
|
|
|
this.disabledBtn = true |
|
|
|
vehicleOutLibrary(this.temp).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
if (response.success && response.data === null) { |
|
|
|
this.disabledBtn = false |
|
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else if (response.success && response.data !== null) { |
|
|
|
this.dialogVisible = true |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
this.disabledBtn = false |
|
|
@ -367,6 +392,22 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
if (this.temp.isUpdateOrInsertCrm === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '是否修改客户编码请选择是或否' }) |
|
|
|
return |
|
|
|
} |
|
|
|
isUpdateOrInsertCrm(this.temp).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '操作成功' }) |
|
|
|
this.handleColse() |
|
|
|
this.handleReturn('true') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleColse() { |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
@ -397,7 +438,8 @@ export default { |
|
|
|
staffSid: '', // 销售专员sid |
|
|
|
type: '', // 出库类型 |
|
|
|
typeKey: '', // 出库类型Key |
|
|
|
createOrgSid: '' |
|
|
|
createOrgSid: '', |
|
|
|
isUpdateOrInsertCrm: '' |
|
|
|
} |
|
|
|
this.$refs['dataForm'].resetFields() |
|
|
|
this.$emit('doback') |
|
|
|