diff --git a/anrui-scm/anrui-scm-ui/src/api/supplychain/yancheguanli.js b/anrui-scm/anrui-scm-ui/src/api/supplychain/yancheguanli.js index 44d63fadab..a2f840d8b2 100644 --- a/anrui-scm/anrui-scm-ui/src/api/supplychain/yancheguanli.js +++ b/anrui-scm/anrui-scm-ui/src/api/supplychain/yancheguanli.js @@ -32,7 +32,7 @@ export function getCarInspectedInfo(data) { // 验车管理详情回显 export function getCarInspected(data) { return request({ - url: '/terminal/supplychain/v1/carInspected/getCarInspected/{inspectedSid}' + data, + url: '/terminal/supplychain/v1/carInspected/getCarInspected/' + data, method: 'get' }) } diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAlready.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAlready.vue index 6a860c2f80..cd6b80afd6 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAlready.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAlready.vue @@ -48,6 +48,11 @@ + + + @@ -74,6 +79,7 @@ + @@ -81,6 +87,7 @@ import ButtonBar from '@/components/ButtonBar' import Pagination from '@/components/pagination' import pageye from '@/components/pagination/pageye' +import rukuguanliInfo from '@/views/supplychain/rukuguanli/rukuguanliInfo' import { getUseOrgByUserSid, selectModelName } from '@/api/cheliang/basevehicle' import { typeValues } from '@/api/supplychain/yancheguanli' import { selectCarWarehousingList } from '@/api/supplychain/rukuguanli' @@ -91,7 +98,7 @@ export default { ButtonBar, Pagination, pageye, - + rukuguanliInfo }, data() { return { @@ -150,7 +157,7 @@ export default { }) }, resetState() { - this.viewState = 1 + this.viewState = 5 }, btnHandle(btnKey) { console.log('XXXXXXXXXXXXXXX ' + btnKey) @@ -190,6 +197,11 @@ export default { } this.getList() }, + handleInfo(row){ + this.$refs['divinfo'].showInfo(row) + console.log('详情回显', row) + this.viewState = 6 + }, loadList() { const _this = this this.tableLoading = true diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliInfo.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliInfo.vue index d4c3daaa38..0aaa4fedd3 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliInfo.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliInfo.vue @@ -41,11 +41,7 @@ - - - + {{ temp.warehouse }} @@ -54,9 +50,9 @@ 附件 - + :src="item" @click="open(temp.image)"> @@ -116,7 +112,7 @@ export default { this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) - getCarWarehousing(row.inspectedSid).then((res) => { + getCarWarehousing(row.warehousingSid).then((res) => { if (res.success) { this.temp = res.data } diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue index 74708a8ace..0314b80273 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue @@ -19,14 +19,14 @@ - + - +
diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanliAdd.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanliAdd.vue index d3a8be25aa..eacf3725e0 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanliAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanliAdd.vue @@ -17,10 +17,9 @@ @@ -41,6 +40,7 @@ @@ -121,13 +121,16 @@ export default { vin: '', config: '', model: '', - inspectedSid:'' + inspectedSid: '' }, // 添加和修改 dialogFormVisible: false, // 添加修改对话框状态 dialogFormShowVisible: false, // 查看对话框默认关闭状态 dialogStatus: '', // 对话框状态 vehiclePhoto: [], - rules: {} + rules: { + vin: [{ required: true, message: '车架号不能为空', trigger: 'blur' }], // 车架号 + price: [{ required: true, message: '洗车费不能为空', trigger: 'blur' }] // 洗车费 + } // ------------------------------------ } }, @@ -144,10 +147,32 @@ export default { } getCarInspectedInfo(data).then((res) => { if (res.success) { + this.temp = res.data this.temp.vin = res.data.vin this.temp.config = res.data.config this.temp.model = res.data.model this.temp.inspectedSid = res.data.inspectedSid + this.temp.purchaseKey = res.data.purchaseKey + if (this.temp.carInspectedImage.length > 0) { + for (var i = 0; i < this.temp.carInspectedImage.length; i++) { + const imgName = this.temp.carInspectedImage[i].split('/') + this.imgList01.push({ + name: imgName[imgName.length - 1], + url: this.temp.carInspectedImage[i] + }) + } + console.log('imgList01', this.imgList01) + } + if (this.temp.factoryImage.length > 0) { + for (var i = 0; i < this.temp.factoryImage.length; i++) { + const imgName = this.temp.factoryImage[i].split('/') + this.imgList02.push({ + name: imgName[imgName.length - 1], + url: this.temp.factoryImage[i] + }) + } + console.log('imgList02', this.imgList02) + } } }) }, @@ -200,16 +225,20 @@ export default { getUrl() { if (this.imgList01.length > 0) { console.log('imgList01', this.imgList01) + const img01_list = [] for (var i = 0; i < this.imgList01.length; i++) { - this.temp.carInspectedImage.push(this.imgList01[i].url) + img01_list.push(this.imgList01[i].url) + this.temp.carInspectedImage = img01_list } } else { this.temp.carInspectedImage = [] } if (this.imgList02.length > 0) { console.log('imgList02', this.imgList02) + const img02_list = [] for (var i = 0; i < this.imgList02.length; i++) { - this.temp.factoryImage.push(this.imgList02[i].url) + img02_list.push(this.imgList02[i].url) + this.temp.factoryImage = img02_list } } else { this.temp.factoryImage = [] @@ -227,8 +256,10 @@ export default { vin: '', config: '', model: '', - inspectedSid:'' + inspectedSid: '' } + this.imgList01 = [] + this.imgList02 = [] this.$emit('doback') }, // 提交添加数据 @@ -237,6 +268,22 @@ export default { this.$refs['dataForm'].validate((valid) => { if (valid) { this.FormLoading = true + if (this.temp.carInspectedImage.length == 0) { + this.$message({ + showClose: true, + message: '请上传验车相关照片!', + type: 'error' + }); + return + } + if (this.temp.factoryImage.length == 0) { + this.$message({ + showClose: true, + message: '请上传厂家验车单照片!', + type: 'error' + }); + return + } // 只需添加和修改 saveCarInspectedInfo(this.temp).then((response) => { this.FormLoading = false @@ -244,22 +291,39 @@ export default { this.dialogFormVisible = false this.handleReturn('true') } else { - this.$notify({ - title: '提示', - message: '添加失败', - type: 'error', - duration: 2000 - }) + this.$message({ + showClose: true, + message: '添加失败!', + type: 'error' + }); } }) } }) }, handlePass() { + this.getUrl() this.$refs['dataForm'].validate((valid) => { if (valid) { submitCarInspectedInfo(this.temp).then((response) => { this.FormLoading = false + if (this.temp.carInspectedImage.length == 0) { + this.$message({ + showClose: true, + message: '请上传验车相关照片!', + type: 'error' + }); + return + } + console.log('照片02',this.temp.factoryImage) + if (this.temp.factoryImage.length == 0) { + this.$message({ + showClose: true, + message: '请上传厂家验车单照片!', + type: 'error' + }); + return + } if (response.code === '200') { this.dialogFormVisible = false this.handleReturn('true')