diff --git a/api/carManage.js b/api/carManage.js index e6f072c..cbdaefa 100644 --- a/api/carManage.js +++ b/api/carManage.js @@ -3,8 +3,8 @@ import request from '@/utils/request'; // 到货确认单-列表 export function getOutPageList(data) { return request({ - url: '/app/aapController/getOutPageList', - method: 'post', + url: '/gz_car/app/aapController/getOutPageList', + method: 'get', data }); } @@ -12,7 +12,7 @@ export function getOutPageList(data) { // 到货确认单-上传 export function uploadFile(data) { return request({ - url: '/app/aapController/uploadFile', + url: '/gz_car/app/aapController/uploadFile', method: 'post', data }); @@ -21,7 +21,7 @@ export function uploadFile(data) { // 到货确认单-计划详情 export function getDispatchCarListData(data) { return request({ - url: '/app/aapController/getDispatchCarListData', + url: '/gz_car/app/aapController/getDispatchCarListData', method: 'post', data }); @@ -30,7 +30,7 @@ export function getDispatchCarListData(data) { // 到货确认单-派车详情 export function getDispatchCarData(data) { return request({ - url: '/app/aapController/getDispatchCarData', + url: '/gz_car/app/aapController/getDispatchCarData', method: 'post', data }); @@ -39,8 +39,8 @@ export function getDispatchCarData(data) { // 派车分配-列表 export function getPlanList(data) { return request({ - url: '/app/aapController/getPlanList', - method: 'post', + url: '/gz_car/app/aapController/getPlanList', + method: 'get', data }); } @@ -48,7 +48,7 @@ export function getPlanList(data) { // 派车分配-供应商-列表 export function getContractSupList(data) { return request({ - url: '/app/aapController/getContractSupList', + url: '/gz_car/app/aapController/getContractSupList', method: 'post', data }); @@ -57,7 +57,7 @@ export function getContractSupList(data) { // 派车分配-供应商-分配 export function addPlanSupInfo(data) { return request({ - url: '/app/aapController/addPlanSupInfo', + url: '/gz_car/app/aapController/addPlanSupInfo', method: 'post', data }); @@ -66,7 +66,7 @@ export function addPlanSupInfo(data) { // 派车分配-详情 export function getPlanDetails(data) { return request({ - url: '/app/aapController/getPlanDetails', + url: '/gz_car/app/aapController/getPlanDetails', method: 'post', data }); @@ -75,8 +75,8 @@ export function getPlanDetails(data) { // 派车审核-列表 export function getAuditList(data) { return request({ - url: '/app/aapController/getAuditList', - method: 'post', + url: '/gz_car/app/aapController/getAuditList', + method: 'get', data }); } @@ -84,7 +84,7 @@ export function getAuditList(data) { // 派车审核-审核 export function dispatchAudit(data) { return request({ - url: '/app/aapController/dispatchAudit', + url: '/gz_car/app/aapController/dispatchAudit', method: 'post', data }); @@ -93,16 +93,16 @@ export function dispatchAudit(data) { // 派车审核-详情 export function getOutDetails(data) { return request({ - url: '/app/aapController/getOutDetails', + url: '/gz_car/app/aapController/getOutDetails', method: 'post', data }); } // 派车审核-审核记录 -export function getAuditRecord(data) { +export function getAuditDetails(data) { return request({ - url: '/app/aapController/getAuditRecord', + url: '/gz_car/app/aapController/getAuditDetails', method: 'post', data }); diff --git a/api/login.js b/api/login.js index 6388ca1..d5a7d4a 100644 --- a/api/login.js +++ b/api/login.js @@ -3,7 +3,7 @@ import request from '@/utils/request'; // 登录方法 export function login(data) { return request({ - url: '/login/appUserLogin', // login - ruoyi + url: '/gz_car/login/appUserLogin', // login - ruoyi headers: { isToken: false, 'Content-Type': 'application/x-www-form-urlencoded' diff --git a/config.js b/config.js index 6b0b8af..c045858 100644 --- a/config.js +++ b/config.js @@ -1,12 +1,14 @@ // 应用全局配置 module.exports = { // baseUrl: 'https://vue.ruoyi.vip/prod-api', - baseUrl: 'http://192.168.0.39:21522/gz_car', // 车辆 + baseUrl: 'http://192.168.0.38:21522', // 车辆 // baseUrl: 'http://192.168.0.14:21520', // baseUrl: 'http://localhost:8080', uploadFileUrl: '/app/common/appUploadFile', + uploadFileUrlGzCar: '/app/aapController/appUploadFile', // fileUrl: 'http://192.168.0.39:21995/statics', // 图片预览 fileUrl: 'http://192.168.0.14:21520/statics', // 图片预览 + fileUrlGzCar: 'http://192.168.0.38:21522/gz_car/statics', // 图片预览 // 应用信息 appInfo: { // 应用名称 diff --git a/pages/arrivalConfirmation/index.vue b/pages/arrivalConfirmation/index.vue index 6c0ac93..fef0ebf 100644 --- a/pages/arrivalConfirmation/index.vue +++ b/pages/arrivalConfirmation/index.vue @@ -15,11 +15,11 @@
-
{{ item.name }}
+
{{ item.code }}
- +
@@ -32,21 +32,21 @@
派车数量: - {{ item.pcNum }} + {{ item.dispatchNum }}
- +
派车时间: - {{ item.time }} + {{ item.outTime }}
@@ -70,16 +70,23 @@ + + diff --git a/pages/sendACarSystem/components/PlanAuditDetails.vue b/pages/sendACarSystem/components/PlanAuditDetails.vue index 9190eb8..c4a1845 100644 --- a/pages/sendACarSystem/components/PlanAuditDetails.vue +++ b/pages/sendACarSystem/components/PlanAuditDetails.vue @@ -5,43 +5,46 @@ class="list-cont" v-for="(item, index) in tableList" :key="index" - :style="{ background: index == 0 ? '#E3EDF5' : '#E4EAF5' }" + :style="{ background: item.planType == 1 ? '#E3EDF5' : '#E4EAF5' }" >
{{ index + 1 }} - {{ item.carName }} - {{ item.carType }} + {{ item.name }} + {{ item.model }}
- {{ item.name }} + {{ item.supName }}
{{ item.carNum }} - {{ item.carType }} - {{ item.carLoad }} + {{ item.planType == 1 ? item.carType : item.type }} + {{ item.planType == 1 ? item.ton : item.model }} +
+
+ {{ item.goodsName }}
- {{ item.tool }} + {{ item.planType == 1 ? item.gls : item.planDay }}
-
- {{ item.distance }} +
+ {{ item.useAddress }}
-
- {{ item.company }} +
+ {{ item.startAddress }}
-
- {{ item.address }} +
+ {{ item.endAddress }}
附件数量 @@ -59,7 +62,7 @@
- +
@@ -82,7 +85,13 @@
{{ imgList && imgList.length > 0 ? imgList[current].title : '' }}
- + diff --git a/pages/sendACarSystem/index.vue b/pages/sendACarSystem/index.vue index 402062d..4f9cfc4 100644 --- a/pages/sendACarSystem/index.vue +++ b/pages/sendACarSystem/index.vue @@ -30,8 +30,8 @@
- - + +
@@ -43,22 +43,23 @@
计划类型: - {{ item.plan }} + {{ item.typeName }}
- + - + +
供 应 商: - {{ item.sub }} + {{ item.supName }}
@@ -74,8 +75,8 @@ :customStyle="{ marginBottom: '8px' }" v-for="(item, index) in radioList" :key="index" - :label="item.supName" - :name="item.supId" + :label="item.name" + :name="item.id" >
@@ -129,28 +130,21 @@ export default { checkStatusId: '', // 审核状态id showPicker: false, columns: [ + { + label: '全部', + value: '' + }, { label: '已审核', - value: 1 + value: '1' }, { label: '待审核', - value: 0 + value: '0' } ], // 单选 - radioList: [ - { - supId: 1, - supName: '供应商1', - contractId: 1 - }, - { - supId: 2, - supName: '供应商2', - contractId: 2 - } - ], + radioList: [], supId: '', // 供应商id supName: '', // 供应商名称 contractId: '', // 合同id @@ -164,7 +158,7 @@ export default { return this.active == 1 ? 'flex-start' : 'center' } }, - onLoad() { + onShow() { this.getList() }, methods: { @@ -172,44 +166,12 @@ export default { this.active = index this.pageNum = 1 this.pageSize = 10 + this.tableList = [] + this.total = 0 + this.checkStatus = '' + this.checkStatusId = '' + this.keyWord = '' this.getList() - if (index == 1) { - this.tableList = [ - { - code: '20210801', - proName: '项目名称', - plan: '计划1', - sub: '供应商1', - // 已派车 - isSend: true - }, - { - code: '20210802', - proName: '项目名称', - plan: '计划2', - sub: '供应商2', - // 待派车 - isSend: false - } - ] - } else { - this.tableList = [ - { - code: '20210803', - proName: '项目名称', - plan: '计划1', - sub: '供应商1', - status: 1 - }, - { - code: '20210804', - proName: '项目名称', - plan: '计划2', - sub: '供应商2', - status: 0 - } - ] - } }, handleSearch() { console.log('搜索', this.keyWord.trim()) @@ -219,20 +181,29 @@ export default { async getList() { try { const params = { - encryptedData: JSON.stringify({ keyWord: this.keyWord.trim() }), + encryptedData: JSON.stringify({ + keyWord: this.keyWord.trim(), + status: this.checkStatusId + }), pageNum: this.pageNum, pageSize: this.pageSize } console.log('🚀 ~ getList ~ params', params) - let res = null - if (this.active == 1) { - res = await getPlanList(params) - } else { - res = await getAuditList(params) + try { + let res = null + if (this.active == 1) { + // 派车分配-列表 + res = await getPlanList(params) + } else { + // 派车审核-列表 + res = await getAuditList(params) + } + console.log('🚀 ~ getList ~ res', res) + this.tableList = res.list + this.total = res.total + } catch (error) { + console.log('🚀 ~ getList ~ error', error) } - console.log('🚀 ~ getList ~ res', res) - this.tableList = res.data.list - this.total = res.data.total } catch (error) { console.log('🚀 ~ getList ~ error', error) } @@ -273,20 +244,25 @@ export default { const params = { encryptedData: JSON.stringify({ type: item.type }) } - const res = await getContractSupList(params) - console.log('🚀 ~ getContractSupList ~ res', res) + try { + const res = await getContractSupList(params) + console.log('🚀 ~ getContractSupList ~ res', res) + this.radioList = res.data + } catch (error) { + console.log('🚀 ~ getContractSupList ~ error', error) + } }, confirm(e) { console.log('🚀 ~ confirm ~ e', e) this.checkStatus = e.value[0].label this.checkStatusId = e.value[0].value + this.getList() this.showPicker = false }, - groupChange(e) { - console.log('🚀 ~ supId', e) - this.supId = e - this.supName = this.radioList.find((item) => item.supId == e).supName - this.contractId = this.radioList.find((item) => item.supId == e).contractId + groupChange() { + console.log('🚀 ~ supId', this.supId) + this.supName = this.radioList.find(item => item.id == this.supId).name + this.contractId = this.radioList.find(item => item.id == this.supId).contractId console.log('🚀 ~ supName', this.supName, this.contractId) }, // 查看详情 @@ -296,13 +272,13 @@ export default { let isAudit = false let isDetail = false let active = null - if (this.active == 1 && !item.isSend) { + if (this.active == 1 && !item.supId) { isPlan = true active = 1 } else if (this.active == 2 && item.status == 0) { isAudit = true active = 2 - } else if (item.isSend || item.status == 1) { + } else { isDetail = true active = 1 } @@ -342,33 +318,50 @@ export default { this.dispatchAudit() } this.showModal = false + this.getList() }, // 确认分配供应商 async addPlanSupInfo() { const params = { encryptedData: JSON.stringify({ type: this.row.type, - id: this.row.id, + id: this.row.planId, supId: this.supId, supName: this.supName, contractId: this.contractId }) } - const res = await addPlanSupInfo(params) - console.log('🚀 ~ addPlanSupInfo ~ res', res) + try { + const res = await addPlanSupInfo(params) + console.log('🚀 ~ addPlanSupInfo ~ res', res) + uni.showToast({ + title: '分配成功', + icon: 'success' + }) + } catch (error) { + console.log('🚀 ~ addPlanSupInfo ~ error', error) + } }, // 派车审核 async dispatchAudit() { const params = { encryptedData: JSON.stringify({ - id: this.row.id, + id: this.row.outId, planId: this.row.planId, status: this.isPass ? 1 : 2, remark: this.remark }) } - const res = await dispatchAudit(params) - console.log('🚀 ~ dispatchAudit ~ res', res) + try { + const res = await dispatchAudit(params) + console.log('🚀 ~ dispatchAudit ~ res', res) + uni.showToast({ + title: '审核成功', + icon: 'success' + }) + } catch (error) { + console.log('🚀 ~ dispatchAudit ~ error', error) + } } } } diff --git a/utils/request.js b/utils/request.js index 746d7d8..cb9fdc7 100644 --- a/utils/request.js +++ b/utils/request.js @@ -99,7 +99,7 @@ const request = config => { // res = JSON.parse(decryptCBC(res.data)) // console.log('🚀 ~ request.js ~ line 100 ~ res', res) const code = res.data.code || 200 - console.log('🚀 ~ ~ code', code) + // console.log('🚀 ~ ~ code', code) const msg = errorCode[code] || res.data.msg || errorCode['default'] // console.log('🚀 ~ ~ msg', msg) if (code === 401) {