diff --git a/jsFile/public-api.js b/jsFile/public-api.js index 0d1c97c..2ea892f 100644 --- a/jsFile/public-api.js +++ b/jsFile/public-api.js @@ -29,7 +29,7 @@ export function handleWorkOrderGet(data) { } // 处理工单,提交 export function handleWorkOrderSubmit(data) { - return request.get("/universal/api.order/process_order", data); + return request.post("/universal/api.order/process_order", data); } // 获取产品类型 diff --git a/pagesA/dataQuery/queryFunction.vue b/pagesA/dataQuery/queryFunction.vue index 9b7330a..e206c33 100644 --- a/pagesA/dataQuery/queryFunction.vue +++ b/pagesA/dataQuery/queryFunction.vue @@ -23,17 +23,7 @@ {{item.name}} 编号:{{item.serial_number}} - - {{item.industry_name}} - {{item.member_level}} - {{item.member_type}} - - {{item.project_count}} - - - - {{item.address}} @@ -81,19 +71,14 @@ list_rows:this.list_rows, page:this.page } - this.$requst.post('/universal/api.search/search',params).then(res=>{ + this.$requst.get('/universal/api.search/search',params).then(res=>{ console.log(res,'最新客户') if(res.code) { - res.data.data.forEach(item=>{ + res.data.forEach(item=>{ let obj = { id:item.member_id, name:item.name, - industry_name:item.industry_name, - serial_number:item.serial_number, - member_level:item.member_level, - member_type:item.member_type, - project_count:item.project_count, - address:item.address + serial_number:item.serial_number } this.recentlyQuery.push(obj); }) @@ -232,9 +217,15 @@ padding: 50rpx 34rpx 44rpx; } + .recently-query-content{ + width: 676rpx; + margin: 0 auto; + } + .recently-query-content .li { background-color: #FFFFFF; - padding: 30rpx 34rpx; + padding: 32rpx; + border-radius: 15rpx; } .recently-query-content .li .title { @@ -245,7 +236,6 @@ .recently-query-content .li .code { font-size: 24rpx; - margin-bottom: 25rpx; color: #666666; } @@ -267,7 +257,6 @@ .recently-query-content .li .li-content { display: flex; align-items: center; - border-bottom: 2rpx solid #EDEDED; justify-content: space-between; } diff --git a/pagesA/workOrder/workOrderAudit.vue b/pagesA/workOrder/workOrderAudit.vue index 9f390bf..339dc47 100644 --- a/pagesA/workOrder/workOrderAudit.vue +++ b/pagesA/workOrder/workOrderAudit.vue @@ -2,235 +2,102 @@ - - - - {{item.title}} + + + + 工单编号: + + + + 项目名称: + + + + 客户名称: + + + + + 结算方式: + + + + 支付方式: + + - - - - - - - 状态:{{statusText}} - - 工单编号: - - - - - 项目编号: - - - - 项目名称: - - - - 产品类型: - - - - 安装位置: - - - - 维保类型: - - - - 紧急程度: - - - - 维保说明: - {{detailObj.failure_description}} - - - 维保图片: - - - - + + + + 上门费 + + + + 税金 + + + + 材料费 + + + + 其他费用 + + + + 实际付款:¥{{auditData.pay_price}} + + 是否开票 + + + + - - - 报 单 人: - - - - 报单时间: - - - - 服务方式: - - - - 定位地址: - - + 是 + + + + + 否 - - - - - - - - - 状态:{{statusText}} - - 开始时间: - - - - 结束时间: - - - - 维保用时: - - - - 维保费用: - - - - 等待时长: - - - - 主维保人: - - - - 更换配件: - - - - - - - - - - - - - - - - - 工作描述: - {{handleDetail.work_explanation}} - - - 维保图片: - - - - - - - - 维保原因: - + + + + 审核通过 + 审核不通过 + - + + @@ -243,7 +110,7 @@ } from '../../jsFile/public-api.js'; export default { components: { - footTabOne, + 'foot-tab' :footTabOne, statusNav, containerSubgroupTwo }, @@ -252,32 +119,12 @@ swiperCurrent: 0, swiHeight: 0, statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 40, - statusText: '', //状态文字 - statusColor: '', //状态背景颜色 - detailsNav: [{ - title: "基础信息", - state: true - }, - { - title: "处理详情", - state: false - }, - { - title: "更换配件", - state: false - }, - { - title: "处理过程", - state: false - }, - - ], - orderId: '', //订单id - detailObj: {}, //基础信息 - handleDetail: {}, //处理详情 - replaceParts: [], //更换配件 - handleProcess: {}, //处理过程 - order_status: '' //当前订单状态 + ifInvoicing:false, //是否开票 + ifCollection:false, //是否收款 + remarksMsg:'', //备注信息 + auditData:[], //工单展示数据 + setTime:'', //提交时间 + type: 0, //接口状态 } }, mounted() { @@ -285,508 +132,242 @@ query.select('#swi1').boundingClientRect(data => { this.swiHeight = data.height - 100 }).exec(); - this.detailsNavFun(0) - }, onLoad(op) { - this.statusText = op.statusText; - this.statusColor = op.statusColor; if (op.orderId != undefined) { this.orderId = op.orderId; // 调取获取工单详情事件 - this.getDetail(1); + this.getDetail(); } }, methods: { - // 获取工单详情事件 - getDetail(type) { + // 获取当前时间 + getDate() { + const date = new Date(); + let year = date.getFullYear(); + let month = date.getMonth() + 1; + let day = date.getDate(); + let hour = date.getHours(); + let minute = date.getMinutes(); + + month = month > 9 ? month : '0' + month; + day = day > 9 ? day : '0' + day; + this.setTime = `${year}-${month}-${day} ${hour}:${minute}` + }, + // 获取工单详情 + getDetail() { let params = { order_id: this.orderId, - type:type } - this.$requst.get('/universal/api.order/order_info', params).then(res => { - console.log(res.data,'工单详情') + this.$requst.get('/universal/api.order/audit', params).then(res => { + console.log('查询接口') if (res.code) { - switch (type) { - case 1: - this.detailObj = res.data; - this.order_status = this.detailObj.order_status; - break; - case 2: - this.handleDetail = res.data; - break; - case 3: - this.replaceParts = res.data.accessory; - break; - case 4: - this.handleProcess = res.data; - break; - } - setTimeout(() => { - const query = uni.createSelectorQuery().in(this); - query.select(`#swi${type}`).boundingClientRect(data => { - this.swiHeight = data.height - }).exec(); - }, 500) + this.auditData = res.data; + this.getDate(); } }) }, - copy(value) { - //提示模板 - uni.showModal({ - content: value, //模板中提示的内容 - confirmText: '复制内容', - success: () => { //点击复制内容的后调函数 - //uni.setClipboardData方法就是讲内容复制到粘贴板 - uni.setClipboardData({ - data: value, //要被复制的内容 - success: () => { //复制成功的回调函数 - uni.showToast({ //提示 - title: '复制成功' + // 提交审核结果 + setFormEv(audit) { + if(this.checkEmpty()){ + // 提交审核结果 + let params = { + order_id: this.orderId, + is_audit: audit, + settlement_remark: this.remarksMsg + } + this.$requst.post('/universal/api.order/audit', params).then(res => { + if (res.code == 0) { + this.$toolAll.tools.showToast('提交成功'); + setTimeout(()=>{ + uni.navigateTo({ + url:`/pagesA/workOrder/workOrderLlsit?status='待审批'&statusId=6` }) - } - }); - } - }); - }, - swiperCurrentFun(data) { - let current = data.detail.current; - // 调用工单详情切换事件 - // this.detailSwitch(current); - this.detailsNavFun(current); - }, - detailsNavFun(index) { - for (var i = 0; i < this.detailsNav.length; i++) { - this.detailsNav[i].state = false + },500) + } + }) } - this.detailsNav[index].state = true }, - detailsNavpa(index) { - this.swiperCurrent = index; - // 调用工单详情切换事件 - this.detailSwitch(index); + // 判空事件 + checkEmpty(){ + let result = false; + if(this.remarksMsg == '') { + this.$toolAll.tools.showToast('请填写备注信息'); + } else { + result = true; + } + return result; }, - // 工单详情切换事件 - detailSwitch(index) { - let type = [1, 2, 3, 4][index]; - this.getDetail(type); - }, - // 前往评价页面 - goEvaluate() { - uni.navigateTo({ - url: `/pagesB/i-want-evaluate/i-want-evaluate?orderId=${this.orderId}` - }) - } - } } diff --git a/static/iocn/icon-yes.png b/static/iocn/icon-yes.png new file mode 100644 index 0000000..f14e596 Binary files /dev/null and b/static/iocn/icon-yes.png differ