Browse Source

完善车辆台账--车辆出库

master
yunuo970428 3 years ago
parent
commit
a16116c087
  1. 12
      anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js
  2. 50
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/relation/cheliangtaizhangChu.vue
  3. 2
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue

12
anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js

@ -147,6 +147,18 @@ export function vehicleOutLibrary(data) {
})
}
// 出库时判断是否--客户编码
export function isUpdateOrInsertCrm(data) {
return request({
url: '/base/isUpdateOrInsertCrm/isUpdateOrInsertCrm',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
// 买断
export function vehicleBuyBreak(data) {
return request({

50
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/relation/cheliangtaizhangChu.vue

@ -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')

2
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue

@ -105,7 +105,7 @@
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.vehicleAlias }}</span>
</template>
</el-table-column>
<el-table-column label="已关联配置数量" width="120" align="center">
<el-table-column label="已关联配置数量" width="140" align="center">
<template slot-scope="scope">
<span>{{ scope.row.relationConfigNum }}</span>
</template>

Loading…
Cancel
Save