代码提交

test
zhangdi 1 year ago
parent cc30168a60
commit 6ac3b2e3ac
  1. 78
      api/api.js
  2. 359
      common/betone_components/betone-list.vue
  3. 3
      common/betone_components/betone-new-input.vue
  4. 6
      common/betone_components/betone-upload.vue
  5. 3
      main.js
  6. 4
      pages/home/index.vue
  7. 4
      pages/inspection/components/plan-list.vue
  8. 8
      pages/inspection/quest.vue
  9. 4
      pages/login/authInfo.vue
  10. 6
      pages/login/login.vue
  11. 8
      pages/my/my.vue
  12. 12
      pages/my/records.vue
  13. 10
      pages/order/tasking.vue
  14. 8
      pages/register/index.vue
  15. 24
      pages/submission/components/subForm.vue
  16. 144
      pages/submission/evaluate.vue
  17. 3
      pages/submission/index.vue
  18. 11
      pages/submission/records.vue
  19. 181
      pages/submission/recordsdetails.vue
  20. 538
      pages/submission/sendOrders.vue
  21. 28
      store/$u.mixin.js

@ -50,31 +50,27 @@ const install = (Vue, vm) => {
}) })
// 需求提报 提交接口 // 需求提报 提交接口
let workOrderSave = (params) => http.post('/workOrder/save', params, { let workOrderSave = (params) => http.post('/lab-ops/work-order/customer-save', params, {
authorizations: true, authorizations: true,
isparams: false isparams: false
}) })
// 需求提报 列表 /lab/workOrder/list // 需求提报 列表
let getWorkOrderRecords = (params) => http.get('/workOrder/list', { ...params }, { let getWorkOrderRecords = (params) => http.get('/lab-ops/work-order/page', { ...params }, {
authorizations: true, authorizations: true,
isparams: false isparams: false
}) })
// 根据id查询故障详情 // 根据id查询故障详情
let getBreakdownInfo = (params) => http.get('/workOrder/detail', { ...params }, { let getBreakdownInfo = (params) => http.get('/lab-ops/work-order/detail', { ...params }, {
authorizations: true, authorizations: true,
isparams: false isparams: false
}) })
// 修改白送 /lab/workOrder/update // 修改需求单
let workOrderupdate = (params) => http.post('/workOrder/update', params, { let workOrderupdate = (params) => http.post('/lab-ops/work-order/update', params, {
authorizations: true, authorizations: true,
isparams: true isparams: true
}) })
// 评价提交
let evaluateSign = (params) => http.post('/workOrder/evaluateSign', params, {
authorizations: true,
isparams: false
})
// 获取维修人员 / // 获取维修人员 /
let getRepairPersons = (params) => http.get('/blade-system/user/repairPersons', { ...params }, { let getRepairPersons = (params) => http.get('/blade-system/user/repairPersons', { ...params }, {
@ -137,7 +133,7 @@ const install = (Vue, vm) => {
isparams: true isparams: true
}) })
// 客服关闭接口 / // 客服关闭接口 /
let cloneOrder = (params) => http.post('/workOrder/clone', params, { let cloneOrder = (params) => http.post('/lab-ops/work-order/service-close', params, {
authorizations: true, authorizations: true,
isparams: false isparams: false
}) })
@ -148,7 +144,7 @@ const install = (Vue, vm) => {
isparams: false isparams: false
}) })
// 维修人员驳回 / // 维修人员驳回 /
let repairReject = (params) => http.post('/workOrder/repairReject', params, { let repairReject = (params) => http.post('/lab-ops/work-order/serviceman-reject', params, {
authorizations: true, authorizations: true,
isparams: false isparams: false
}) })
@ -158,8 +154,62 @@ const install = (Vue, vm) => {
isparams: false isparams: false
}) })
// 客服派单
let serviceman = (params) => http.post('/lab-ops/work-order/service-to-serviceman', params, {
authorizations: true,
isparams: false
})
// 维修人员接收工单 /
let servicemanReceive = (params) => http.post('/lab-ops/work-order/serviceman-receive', params, {
authorizations: true,
isparams: false
})
// 维修人员提交维修方案 /
let servicemanSubmit = (params) => http.post('/lab-ops/work-order/serviceman-submit', params, {
authorizations: true,
isparams: false
})
// 魏旭人员确认维修方案
let supervisorconfirm = (params) => http.post('/lab-ops/work-order/supervisor-confirm', params, {
authorizations: true,
isparams: false
})
// 维修负责人 驳回 维修方案 /
let supervisorReject = (params) => http.post('/lab-ops/work-order/supervisor-reject', params, {
authorizations: true,
isparams: false
})
// 客户确认维修方案
let customerConfirm = (params) => http.post('/lab-ops/work-order/customer-confirm', params, {
authorizations: true,
isparams: false
})
// 客户驳回维修方案
let customerReject = (params) => http.post('/lab-ops/work-order/customer-reject', params, {
authorizations: true,
isparams: false
})
// 维修人员确认维修完成
let servicemanRepairSubmit = (params) => http.post('/lab-ops/work-order/serviceman-repair-submit', params, {
authorizations: true,
isparams: false
})
// 评价 已完成 提交
let evaluateSign = (params) => http.post('/lab-ops/work-order/customer-repair-confirm', params, {
authorizations: true,
isparams: false
})
// 评价 未完成 提交
let evaluateRepairReject = (params) => http.post('/lab-ops/work-order/customer-repair-reject', params, {
authorizations: true,
isparams: false
})
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave,sendVerify }; vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave,sendVerify,serviceman,servicemanReceive,servicemanSubmit,supervisorReject ,supervisorconfirm,customerConfirm,customerReject,servicemanRepairSubmit,evaluateRepairReject};
} }
export default { export default {

@ -11,12 +11,12 @@
<view class="order-item" v-for="(item, index) in orderData" :key="index"> <view class="order-item" v-for="(item, index) in orderData" :key="index">
<view class="item-top"> <view class="item-top">
<view class="item-left" v-if="dataTypes == 1"> <view class="item-left" v-if="dataTypes == 1">
<text class="item-orderNo">单号{{ item.requirementCode }}</text> <text class="item-orderNo" v-if="item.status != -1">单号{{ item.requirementCode }}</text>
<text class="item-time"> {{ item.fillingTime }}</text> <text class="item-time"> {{ item.fillingTime }}</text>
</view> </view>
<view class="item-left" v-else> <view class="item-left" v-else>
<text class="item-orderNo">{{ item.reportUnit }}</text> <text class="item-orderNo">{{ item.reportUnit ? item.reportUnit : '单位' }}</text>
<text class="item-time"> 单号{{ item.requirementCode }} {{ item.fillingTime }}</text> <text class="item-time"> 单号{{ item.requirementCode }}</text>
</view> </view>
<view class="item-right"> <view class="item-right">
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle" <u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle"
@ -33,59 +33,64 @@
<text>{{ item.faultDescribe }}</text> <text>{{ item.faultDescribe }}</text>
</view> </view>
<view class="con-btn"> <view class="con-btn">
<!-- 客户查看 --> <!-- 客户 -->
<block v-if="dataTypes == 1"> <block v-if="dataTypes == 1">
<!-- 工单详情 查看维修详情 -->
<u-button size="mini" plain style="margin-right: 32rpx" <u-button size="mini" plain style="margin-right: 32rpx"
@click.stop="goPage(item, 'breakdownView')">查看</u-button> @click.stop="openWorkOrder(item)">查看</u-button>
<u-button v-if="item.status == -1" size="mini" :plain="true" style="margin-right: 32rpx"
:hair-line="true" type="primary" @click="subOrder(item)">提报</u-button>
<u-button size="mini" v-if="item.status == -1" :plain="true" style="margin-right: 32rpx"
:hair-line="true" type="primary" @click="orderUpdate(item)">修改</u-button>
<u-button v-if="item.status == 4" size="mini" :plain="true" style="margin-right: 32rpx"
:hair-line="true" type="primary" @click="orderConfirm(item)">确认方案</u-button>
<u-button v-if="item.status == 5" size="mini" :plain="true" style="margin-right: 32rpx"
:hair-line="true" type="primary" @click="goPage(item, 'location')">查看位置</u-button>
<u-button v-if="item.status == 6" size="mini" :plain="true" style="margin-right: 32rpx"
:hair-line="true" type="primary" @click="openEvaluate(item)">评价</u-button>
</block> </block>
<!-- 客服维修人员维修负责人 --> <!-- 客服 -->
<block v-if="dataTypes != 1"> <block v-if="dataTypes == 2">
<!-- 查看的提报单 -->
<u-button size="mini" plain style="margin-right: 32rpx" <u-button size="mini" plain style="margin-right: 32rpx"
@click.stop="goPage(item, 'details')">查看</u-button> @click.stop="openWorkOrder(item)">查看</u-button>
</block> <u-button v-if="item.status == 0" size="mini" :plain="true" style="margin-right: 32rpx"
<!-- 状态0 客服才能进行派单 -->
<block v-if="item.status == 0 && dataTypes == 2">
<u-button size="mini" :plain="true" style="margin-right: 32rpx"
@click.stop="sendOrders(item)" type="primary">接单</u-button> @click.stop="sendOrders(item)" type="primary">接单</u-button>
</block> <u-button v-if="item.status == 7" size="mini" :plain="true" style="margin-right: 32rpx"
<!-- 状态2 维修人员展示接单确认按钮 --> @click.stop="sendOrders(item)" type="primary">确认付款</u-button>
<block v-if="item.status == 2 && dataTypes == 4"> <u-button v-if="item.status == 0" size="mini" plain type="primary"
<u-button size="mini" :plain="true" style="margin-right: 32rpx" type="primary" style="margin-right: 32rpx" @click="openModel(item, 'close')">关闭</u-button>
@click="orderConfirm(item)">接单确认</u-button>
</block>
<block v-if="item.status == 3 && dataTypes == 4">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" type="primary"
@click="goPage(item, 'details')">维修</u-button>
</block>
<!-- 待提报 --提报 修改-->
<block v-if="item.status == -1">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true"
type="primary" @click="subOrder(item)">提报</u-button>
<u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true"
type="primary" @click="goPage(item, 'breakdownUpdate')">修改</u-button>
</block>
<!-- 待维修 -- 查看位置-->
<block
v-if="(dataTypes == 1) && (item.status == 1 || item.status == 2 || item.status == 3)">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true"
type="primary" @click="goPage(item, 'location')">查看位置</u-button>
</block> </block>
<block v-if="item.status == 4 && dataTypes == 1">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true" <!-- 维修负责人 -->
type="primary" @click="goPage(item, 'evaluate')">评价</u-button> <block v-if="dataTypes == 3">
<!-- 查看维修详情 -->
<u-button size="mini" plain style="margin-right: 32rpx"
@click.stop="openWorkOrder(item)">查看</u-button>
<u-button v-if="item.status == 3" size="mini" :plain="true" style="margin-right: 32rpx"
:hair-line="true" type="primary" @click="orderConfirm(item)">审批</u-button>
</block> </block>
<!--客服角色 关闭 --> <!-- 维修人员 -->
<block v-if="(dataTypes == 2) && (item.status == 8 || item.status == 0)"> <block v-if="dataTypes == 4">
<u-button size="mini" plain type="primary" style="margin-right: 32rpx" <!-- 查看维修详情 -->
@click="openClone(item)">关闭</u-button> <u-button size="mini" plain style="margin-right: 32rpx"
</block> @click.stop="openWorkOrder(item)">查看</u-button>
<!-- 维修负责人 驳回 -->
<block v-if="(dataTypes == 3) && (item.status == 1 || item.status == 7)"> <u-button v-if="item.status == 1" size="mini" :plain="true" style="margin-right: 32rpx"
<u-button size="mini" plain style="margin-right: 32rpx">驳回</u-button> type="primary" @click="orderConfirm(item)">确认</u-button>
<u-button v-if="item.status == 1" size="mini" :plain="true" style="margin-right: 32rpx"
type="primary" @click="openModel(item, 'turn')">驳回</u-button>
<u-button v-if="item.status == 2" size="mini" :plain="true" style="margin-right: 32rpx"
type="primary" @click="orderConfirm(item)">提交</u-button>
<u-button v-if="item.status == 5" size="mini" :plain="true" style="margin-right: 32rpx"
type="primary" @click="openModel(item,'repair')">维修完成</u-button>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
@ -93,17 +98,31 @@
</view> </view>
<u-loadmore margin-top="10" margin-bottom="40" :status="loadingState" /> <u-loadmore margin-top="10" margin-bottom="40" :status="loadingState" />
<betone-loading ref="BetLoading" />
<!-- 关闭 弹框 -->
<betone-modal :title="'关闭原因'" :confirmText="'确认'" v-model="cloneVisible" @cancel="cloneVisible = false"
@confirm="confirmCloseSub">
<view class="modal-text">
<betone-new-input v-model="closeReason" placeholder="请输入" style="margin-bottom: 32rpx" />
</view>
</betone-modal>
<!-- 维修人员驳回 -->
<betone-modal v-model="turnShow" :title="'驳回原因'" @confirm="turnFn" @cancel="turnShow = false">
<view class="modal-text">
<betone-new-input v-model="repaiRejectReason" placeholder="请输入" style="margin-bottom: 32rpx" />
</view>
</betone-modal>
<!-- 关闭 弹框 --> <!-- 维修人员 确认 维修完成 -->
<betone-modal :title="'关闭原因'" :confirmText="'确认'" v-model="cloneVisible" @confirm="confirmCloseSub"> <betone-modal v-model="repairShow" :title="'提示'" @confirm="repairFn" @cancel="repairShow = false">
<view class="modal-text"> <view class="modal-text">
<betone-new-input v-model="cloneReason" placeholder="请输入" style="margin-bottom: 32rpx" /> 请确认维修是否已经完成
</view> </view>
</betone-modal> </betone-modal>
<betone-loading ref="BetLoading" />
</view> </view>
</template> </template>
@ -131,8 +150,8 @@ export default {
待确认: "#81B337", 待确认: "#81B337",
待维修: "#3A62D7", 待维修: "#3A62D7",
待提报: "#81B337", 待提报: "#81B337",
已完成: "#CECECE",
待维修: '#E99D42', 待维修: '#E99D42',
已完成: "#CECECE",
}, },
current: 0, current: 0,
@ -150,8 +169,13 @@ export default {
sendOrdersList: [], sendOrdersList: [],
cloneVisible: false,// cloneVisible: false,//
cloneReason: '',// closeReason: '',//
cloneInfo: {},// rowInfo: {},//
turnShow: false,//
repaiRejectReason: '',//
repairShow:false,//
}; };
}, },
computed: { computed: {
@ -166,7 +190,6 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.getRecordsList() this.getRecordsList()
// this.getRepairPersons()//
// //
uni.$on('onReachBottom', () => { uni.$on('onReachBottom', () => {
if (this.isNomore) { if (this.isNomore) {
@ -187,16 +210,14 @@ export default {
methods: { methods: {
// //
getRecordsList() { getRecordsList() {
this.$refs.BetLoading.show(); this.BetLoading.show();
this.loadingState = "loading"; this.loadingState = "loading";
let query = { let query = {
current: this.page.currentPage, // current: this.page.currentPage, //
size: this.page.pageSize, // size: this.page.pageSize, //
dataType: this.dataTypes,// dataType: this.dataTypes,//
// ...this.searchInfo ...this.searchInfo
// reportUnit: this.searchInfo.reportUnit
} }
this.$u.api.getWorkOrderRecords(query).then(res => { this.$u.api.getWorkOrderRecords(query).then(res => {
if (res.code == 200) { if (res.code == 200) {
@ -215,7 +236,7 @@ export default {
this.loadingState = "nomore"; this.loadingState = "nomore";
this.isNomore = true; this.isNomore = true;
} }
this.$refs.BetLoading.hide(); this.BetLoading.hide();
} }
}).catch(err => { }).catch(err => {
@ -236,72 +257,124 @@ export default {
// tab // tab
changeTab(index) { changeTab(index) {
this.current = index; this.current = index;
this.searchInfo.type = this.tabList[index].key == '9999' ? '' : this.tabList[index].key this.searchInfo.status = this.tabList[index].key == '9999' ? '' : this.tabList[index].key
this.isNomore = false this.isNomore = false
this.page.currentPage = 1; this.page.currentPage = 1;
this.getRecordsList() this.getRecordsList()
}, },
// //
statusName(item) { statusName(item) {
if (this.type != 'submission') { //
if (this.dataTypes == 1) {
if (item == -1) { if (item == -1) {
return '待提报' return '待提报'
} }
if (item == 0) { if (item == 0) {
return '待接单' return '待接单'
} }
if (item == 2) { // if (item == 1 || item == 2 || item == 3) {
return '待维修'
}
if (item == 4) {
return '确认方案'
}
if (item == 5) {
return '维修中'
}
if (item == 6) {
return '待评价'
}
if (item == 7) {
return '待付款'
}
if (item == 8 || item == 9) {
return '已完成'
}
}
// 2 3 4
if (this.dataTypes == 2) {
if (item == 0) {
return '待接单' return '待接单'
} }
if (item == 1 || item == 3) { if (item == 1 || item == 2 || item == 3 || item == 4) {
return '待维修' return '待维修'
} }
if (item == 4 || item == 5 || item == 6 || item == 9) {
return '已完成' if (item == 5) {
return '维修中'
}
if (item == 6) {
return '维修完成'
} }
if (item == 7) { if (item == 7) {
return '已驳回' return '待付款'
} }
} else { if (item == 8 || item == 9) {
if (item == -1) { return '已完成'
return '待提报'
} }
}
// 1839537055389515777
if (this.dataTypes == 3) {
if (item == 0) { if (item == 0) {
return '待接单' return '待接单'
} }
if (item == 2) {
if (item == 1 || item == 3 || item == 2) { return '已驳回'
return '待维修' }
if (item == 3) {
return '待审批'
} }
if (item == 4) { if (item == 4) {
return '维修完成' return '已通过'
} }
if (item == 5) { if (item == 5) {
return '待评价' return '维修中'
} }
if (item == 6) { if (item == 6) {
return '维修完成'
}
if (item == 7) {
return '待付款'
}
if (item == 8 || item == 9) {
return '已完成' return '已完成'
} }
}
if (item == 9||item == 7) { // 1839552581620793346
if (this.dataTypes == 4) {
if (item == 0) {
return '已驳回' return '已驳回'
} }
if (item == 1) {
return '待确认'
}
if (item == 2) {
return '待提交'
}
if (item == 3 || item == 4) {
return '待审批'
}
if (item == 5) {
return '维修中'
}
if (item == 6 || item == 7 || item == 8 || item == 9) {
return '已完成'
}
} }
}, },
// //
subOrder(row) { subOrder(row) {
let query_ = [row] let query_ = [row]
this.$u.api.workOrderSave(query_).then(res => { this.$u.api.workOrderSave(query_).then(res => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.navigateBack({ this.page.currentPage = 1;
delta: 1 // 1 this.getRecordsList()
})
} }
}).catch(err => { }).catch(err => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}) })
}, },
@ -315,7 +388,7 @@ export default {
}); });
}, },
// //
orderConfirm(row) { orderConfirm(row) {
let param = { let param = {
id: row.id id: row.id
@ -338,25 +411,33 @@ export default {
}) })
}, },
// //
openClone(item) { openModel(item, type) {
this.cloneVisible = true if (type == 'close') {
this.cloneInfo = item this.cloneVisible = true
}
if (type == 'turn') {
this.turnShow = true
}
if(type=='repair'){
this.repairShow = true
}
this.rowInfo = item
}, },
confirmCloseSub() { confirmCloseSub() {
if (this.cloneReason == '') { if (this.closeReason == '') {
uni.showToast({ title: "请填写关闭原因", icon: "none" }); uni.showToast({ title: "请填写关闭原因", icon: "none" });
return false; return false;
} }
let query = { let query = {
id: this.cloneInfo.id, id: this.rowInfo.id,
cloneReason: this.cloneReason, closeReason: this.closeReason,
status: 9
} }
this.$refs.BetLoading.show(); this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => { this.$u.api.cloneOrder(query).then(res => {
this.cloneVisible = false this.cloneVisible = false
this.$refs.BetLoading.hide(); this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "关闭成功", icon: "none" }); uni.showToast({ title: "关闭成功", icon: "none" });
this.getRecordsList() this.getRecordsList()
@ -365,45 +446,77 @@ export default {
}, },
// //
goPage(item, type) { goPage(item, type) {
if (type == 'details') {
uni.navigateTo({ // if (type == 'evaluate') {
url: "/pages/submission/recordsdetails?id=" + item.id, // let param = {
}); // id: item.id,
// }
// uni.navigateTo({
// url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
// });
// }
},
//
openWorkOrder(row) {
let param = {
id: row.id,
type: 'breakdownView'
} }
uni.navigateTo({
if (type == 'breakdownView') { url: `/pages/submission/recordsdetails${this.$u.queryParams(param)}`,
let param = { });
id: item.id, },
type: type //
} orderUpdate(item) {
uni.navigateTo({ let param = {
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, id: item.id,
}); type: 'breakdownUpdate'
} }
if (type == 'breakdownUpdate') { uni.navigateTo({
let param = { url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`,
id: item.id, });
type: type },
//
turnFn() {
if (this.repaiRejectReason == '') {
uni.showToast({ title: "请输入驳回原因", icon: "none" });
return false
}
let query = {
id: this.rowInfo.id,
repaiRejectReason: this.repaiRejectReason,
}
this.$u.api.repairReject(query).then(res => {
if (res.code == 200) {
this.turnShow = false
uni.showToast({ title: "驳回成功", icon: "none" });
this.getRecordsList()
} }
uni.navigateTo({ })
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, },
}); //
repairFn(){
let query = {
id: this.rowInfo.id,
} }
if (type == 'evaluate') { this.$u.api.servicemanRepairSubmit(query).then(res => {
let param = { if (res.code == 200) {
this.repairShow = false
uni.showToast({ title: "维修完成", icon: "none" });
this.getRecordsList()
}
})
},
//
openEvaluate(item){
let param = {
id: item.id, id: item.id,
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`, url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
}); });
}
if (type == 'location') {//
uni.navigateTo({
url: `/pages/order/location`,
})
}
}, },
}, },
}; };
</script> </script>
@ -456,7 +569,7 @@ export default {
} }
.item-right { .item-right {
width: 162rpx; max-width: 162rpx;
height: 48rpx; height: 48rpx;
margin: 36rpx 24rpx 0 0; margin: 36rpx 24rpx 0 0;
} }

@ -8,7 +8,7 @@
{{ label }} {{ label }}
</view> </view>
<view class="sp-new-input" v-if="type == 'textarea'" style="padding:16rpx"> <view class="sp-new-input" v-if="type == 'textarea'" >
<u-input <u-input
v-model="v" v-model="v"
@input="ch" @input="ch"
@ -17,6 +17,7 @@
:class="{ 'sp-new-input-diabled': disabled }" :class="{ 'sp-new-input-diabled': disabled }"
:height="height" :height="height"
:disabled="disabled" :disabled="disabled"
style="padding:8rpx"
></u-input> ></u-input>
</view> </view>

@ -147,10 +147,16 @@ export default {
}); });
}, },
uploadFile(filePath) { uploadFile(filePath) {
const token = uni.getStorageSync("token")
uni.uploadFile({ uni.uploadFile({
url: website.baseUrl + "/blade-resource/oss/endpoint/put-file", // url: website.baseUrl + "/blade-resource/oss/endpoint/put-file", //
filePath: filePath, filePath: filePath,
name: "file", // name: "file", //
header: {
'Blade-Auth': 'bearer ' + token,
'Authorization':`Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
'blade-requested-with': 'BladeHttpRequest' //
},
formData: {}, formData: {},
success: (res) => { success: (res) => {
let info = JSON.parse(res.data); let info = JSON.parse(res.data);

@ -7,6 +7,9 @@ Vue.config.productionTip = false
import uView from '@/uni_modules/uview-ui' import uView from '@/uni_modules/uview-ui'
Vue.use(uView) Vue.use(uView)
// 引入uView提供的对vuex的简写法文件
let vuexStore = require('@/store/$u.mixin.js');
Vue.mixin(vuexStore);
App.mpType = 'app' App.mpType = 'app'

@ -55,9 +55,9 @@ export default {
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.$refs.BetLoading.show(); this.BetLoading.show();
setTimeout(() => { setTimeout(() => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}, 1000); }, 1000);
}); });
// //

@ -97,7 +97,7 @@ export default {
// //
getRecordsList() { getRecordsList() {
// this.$refs.BetLoading.show(); //this.BetLoading.show();
// this.$u.api.getDictionaryList().then(res => { // this.$u.api.getDictionaryList().then(res => {
// if (res.code == 200) { // if (res.code == 200) {
@ -105,7 +105,7 @@ export default {
// this.orderData = res.data; // this.orderData = res.data;
// this.$refs.BetLoading.hide(); // this.BetLoading.hide();
// } // }
// }).catch(err => { // }).catch(err => {

@ -107,9 +107,9 @@ export default {
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.$refs.BetLoading.show(); this.BetLoading.show();
setTimeout(() => { setTimeout(() => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}, 1000); }, 1000);
}); });
}, },
@ -135,7 +135,7 @@ export default {
methods: { methods: {
// //
getRecordsList() { getRecordsList() {
this.$refs.BetLoading.show(); this.BetLoading.show();
this.loadingState = "loading"; this.loadingState = "loading";
let query = { let query = {
current: this.page.currentPage, // current: this.page.currentPage, //
@ -163,7 +163,7 @@ export default {
this.loadingState = "nomore"; this.loadingState = "nomore";
this.isNomore = true; this.isNomore = true;
} }
this.$refs.BetLoading.hide(); this.BetLoading.hide();
} }
}).catch(err => { }).catch(err => {

@ -83,9 +83,9 @@
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.$refs.BetLoading.show(); this.BetLoading.show();
setTimeout(() => { setTimeout(() => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}, 1000); }, 1000);
}); });
// //

@ -83,7 +83,7 @@ export default {
uni.showToast({ title: "请输入密码", icon: "none" }); uni.showToast({ title: "请输入密码", icon: "none" });
return false; return false;
} }
this.$refs.BetLoading.show(); this.BetLoading.show();
// // smCrypto // // smCrypto
// const smCryptoInstance = new smCrypto.SM2Instance(); // const smCryptoInstance = new smCrypto.SM2Instance();
// // // //
@ -124,7 +124,7 @@ export default {
console.log(555555555,res.detail.status) console.log(555555555,res.detail.status)
this.$store.dispatch("changeTabbar", res); this.$store.dispatch("changeTabbar", res);
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}) })
.catch((err) => { .catch((err) => {
if (err.error_code == 2004) { if (err.error_code == 2004) {
@ -133,7 +133,7 @@ export default {
}); });
return false return false
} }
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}); });
}, },

@ -79,9 +79,9 @@ export default {
console.log(11111,this.userIfo) console.log(11111,this.userIfo)
this.status = this.userIfo.detail.status this.status = this.userIfo.detail.status
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.$refs.BetLoading.show(); this.BetLoading.show();
setTimeout(() => { setTimeout(() => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}, 1000); }, 1000);
}); });
}, },
@ -97,9 +97,9 @@ export default {
content: "请确认是否要退出登录?", content: "请确认是否要退出登录?",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
this.$refs.BetLoading.show(); this.BetLoading.show();
this.$u.api.logout().then(res => { this.$u.api.logout().then(res => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
//TODO //TODO
uni.removeStorageSync("token"); uni.removeStorageSync("token");
uni.removeStorageSync("userinfo"); uni.removeStorageSync("userinfo");

@ -68,7 +68,7 @@ export default {
methods: { methods: {
// getUserList // getUserList
getUserLists() { getUserLists() {
this.$refs.BetLoading.show() this.BetLoading.show()
let query_ = { let query_ = {
current: 1, current: 1,
size: 10 size: 10
@ -78,7 +78,7 @@ export default {
this.getUserData = res.data.records this.getUserData = res.data.records
} }
this.$refs.BetLoading.hide() this.BetLoading.hide()
}); });
}, },
// //
@ -95,7 +95,7 @@ export default {
}, },
// //
getLoginRcords() { getLoginRcords() {
this.$refs.BetLoading.show() this.BetLoading.show()
let query_ = { let query_ = {
logType: 1, logType: 1,
userId: this.searchInfo.id userId: this.searchInfo.id
@ -104,12 +104,12 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.recordData = res.data this.recordData = res.data
} }
this.$refs.BetLoading.hide() this.BetLoading.hide()
}); });
}, },
// //
getEditRcords() { getEditRcords() {
this.$refs.BetLoading.show() this.BetLoading.show()
let query_ = { let query_ = {
logType: 2, //1 2 logType: 2, //1 2
userId: this.searchInfo.id userId: this.searchInfo.id
@ -119,7 +119,7 @@ export default {
this.recordData = res.data this.recordData = res.data
} }
this.$refs.BetLoading.hide() this.BetLoading.hide()
}); });
}, },
searchData() { searchData() {

@ -95,7 +95,7 @@ export default {
key: "6", key: "6",
}, },
{ {
name: "付款", name: "付款",
key: "7", key: "7",
}, },
{ {
@ -111,6 +111,10 @@ export default {
name: "全部", name: "全部",
key: "9999", key: "9999",
}, },
{
name: "待确认",
key: "1",
},
{ {
name: "待提交", name: "待提交",
key: "2", key: "2",
@ -119,6 +123,10 @@ export default {
name: "待审批", name: "待审批",
key: "3,4", key: "3,4",
}, },
{
name: "已驳回",
key: "0",
},
{ {
name: "维修中", name: "维修中",
key: "5", key: "5",

@ -192,7 +192,7 @@ export default {
uni.$u.toast("请勾选《注册服务协议》及《隐私权政策》"); uni.$u.toast("请勾选《注册服务协议》及《隐私权政策》");
return false; return false;
} }
this.$refs.BetLoading.show(); this.BetLoading.show();
let query_ = { let query_ = {
"deptName": this.registerInfo.businessName,// "deptName": this.registerInfo.businessName,//
"address": this.registerInfo.area,// "address": this.registerInfo.area,//
@ -204,7 +204,7 @@ export default {
"verifyCode": this.registerInfo.verificationCode,// "verifyCode": this.registerInfo.verificationCode,//
} }
this.$u.api.registerUser(query_).then(res => { this.$u.api.registerUser(query_).then(res => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
@ -215,11 +215,11 @@ export default {
uni.$u.toast(res.msg); uni.$u.toast(res.msg);
} }
}).finally(err => { }).finally(err => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
uni.$u.toast(err.data.msg); uni.$u.toast(err.data.msg);
}) })
} else { } else {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
console.log('验证失败'); console.log('验证失败');
} }
}); });

@ -37,7 +37,7 @@
</u-form> </u-form>
</view> </view>
<u-button v-if="type == 'add' || type == 'breakdownUpdate'" plain style="margin-bottom: 64rpx" <u-button v-if="type == 'add'" plain style="margin-bottom: 64rpx"
@click="addBreakdownInfo">新增</u-button> @click="addBreakdownInfo">新增</u-button>
</view> </view>
<view class="sub-btn" v-if="type == 'add' || type == 'breakdownUpdate'"> <view class="sub-btn" v-if="type == 'add' || type == 'breakdownUpdate'">
@ -90,9 +90,9 @@ export default {
}, },
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.BetLoading.show(); this.BetLoading.show();
setTimeout(() => { setTimeout(() => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}, 1000); }, 1000);
}); });
@ -144,24 +144,18 @@ export default {
}, },
// //
async submitBreakdown() { async submitBreakdown() {
// this.$refs.BetLoading.show(); //this.BetLoading.show();
try { try {
this.breakdownInfo.forEach((i, index) => { this.breakdownInfo.forEach((i, index) => {
this.$refs[`breakdownForm${index}`][0].setRules(this.rules) this.$refs[`breakdownForm${index}`][0].setRules(this.rules)
this.$refs[`breakdownForm${index}`][0].validate(valid => { this.$refs[`breakdownForm${index}`][0].validate(valid => {
if (!valid) { if (!valid) {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
validator = false validator = false
return return
} else { } else {
// //
if (this.type == 'breakdownUpdate') {
this.updateInfo()
}
if (this.type == 'add') {
this.submit() this.submit()
}
} }
}) })
@ -176,14 +170,14 @@ export default {
// //
submit() { submit() {
this.$u.api.workOrderSave(this.breakdownInfo).then(res => { this.$u.api.workOrderSave(this.breakdownInfo).then(res => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/submission/records", url: "/pages/submission/records",
}); });
} }
}).catch(err => { }).catch(err => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}) })
}, },
// //
@ -193,14 +187,14 @@ export default {
id: this.pageId id: this.pageId
} }
this.$u.api.workOrderupdate(query_).then(res => { this.$u.api.workOrderupdate(query_).then(res => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/submission/records", url: "/pages/submission/records",
}); });
} }
}).catch(err => { }).catch(err => {
this.$refs.BetLoading.hide(); this.BetLoading.hide();
}) })
} }
}, },

@ -1,18 +1,30 @@
<template> <template>
<view class="page-css"> <view class="page-css">
<view class="container"> <view class="container">
<betone-header-top :titleMin="'您对本次维修的满意度如何?'" /> <view class="question-box">
<view v-for="(item, index) in questionList" :key="index" class="question-box"> <betone-header-top :titleMin="'确认维修是否完成?'" />
<view class="title">{{ index + 1 }}.{{ item.title }}</view>
<view class="btn"> <view class="btn">
<view class="uni-px-5 uni-pb-5"> <view class="uni-px-5 uni-pb-5">
<uni-data-checkbox mode="tag" v-model="item.type" <uni-data-checkbox mode="tag" v-model="completeValue"
:localdata="satisfactionList"></uni-data-checkbox> :localdata="completeList"></uni-data-checkbox>
</view>
</view>
</view>
<view v-if="completeValue == 1">
<betone-header-top :titleMin="'您对本次维修的满意度如何?'" />
<view v-for="(item, index) in questionList" :key="index" class="question-box">
<view class="title">{{ index + 1 }}.{{ item.title }}</view>
<view class="btn">
<view class="uni-px-5 uni-pb-5">
<uni-data-checkbox mode="tag" v-model="item.type"
:localdata="satisfactionList"></uni-data-checkbox>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="sign-box"> <view class="sign-box" v-if="completeValue == 1">
<betone-header-top :titleMin="'请签字确认'" /> <betone-header-top :titleMin="'请签字确认'" />
<image v-if="image2 == ''" src='@/static/images/submit/sign_icon.png' mode="aspectFit" @click="toPop1()" /> <image v-if="image2 == ''" src='@/static/images/submit/sign_icon.png' mode="aspectFit" @click="toPop1()" />
<image v-else :src="image2" style="width: 200px;" mode="widthFix" @click="toPop1()"></image> <image v-else :src="image2" style="width: 200px;" mode="widthFix" @click="toPop1()"></image>
@ -22,14 +34,18 @@
</view> </view>
<jp-signature-popup ref="signature1" popup v-model="image2" /> <jp-signature-popup ref="signature1" popup v-model="image2" />
<betone-loading ref="BetLoading"></betone-loading>
</view> </view>
</template> </template>
<script> <script>
import website from '@/utils/website'
import { Base64 } from '@/uni_modules/js_sdk/js-base64/base64.js';
import { dateFormat } from '@/utils/util.js'
export default { export default {
data() { data() {
return { return {
id: '',//id id: '',//id
userInfo: {},//
questionList: [ questionList: [
{ {
title: '您对本次维修的质量方面满意吗?', title: '您对本次维修的质量方面满意吗?',
@ -54,47 +70,119 @@ export default {
value: 0 value: 0
} }
], ],
image2: '',// image2: '',//
completeValue: null,//
completeList: [
{
text: '已完成',
value: 1
},
{
text: '未完成',
value: 2
}
],
} }
}, },
onLoad(options) { onLoad(options) {
this.id = options.id this.id = options.id
},
onShow() {
this.userInfo = uni.getStorageSync('loginInfo')
}, },
methods: { methods: {
submitBreakdown() { submitBreakdown() {
for (let i = 0; i < this.questionList.length; i++) {
if (this.questionList[i].type == null) {
return false
}
}
let timeNow = new Date().toLocaleDateString() let timeNow = new Date().toLocaleDateString()
let userInfo = uni.getStorageSync('loginInfo')
let query_ = { let query_ = {
id: this.id, //id id: this.id, //id
isOkQuality: this.questionList[0].type, // 0- 1- // isOkQuality: this.questionList[0].type, // 0- 1-
isOkSecure: this.questionList[1].type, // 0- 1- // isOkSecure: this.questionList[1].type, // 0- 1-
isOkValidity: this.questionList[2].type, // 0- 1- // isOkValidity: this.questionList[2].type, // 0- 1-
signatureUrl: this.image2, // // signatureUrl: this.image2, //
signaturePerson: userInfo.user_name, // // signaturePerson: this.userInfo.user_name, //
signatureTime: this.$u.timeFrom(timeNow, 'yyyy-mm-dd hh:MM:ss'), // // signatureTime: this.$u.timeFrom(timeNow, 'yyyy-mm-dd hh:MM:ss'), //
status:6
} }
this.$u.api.evaluateSign(query_).then(res => { this.BetLoading.show()
if (res.code == 200) { if (this.completeValue == 1) {//
uni.showToast({ title: "评价成功", icon: "none" }); for (let i = 0; i < this.questionList.length; i++) {
// if (this.questionList[i].type == null) {
uni.navigateBack({ return false
delta: 1 // 1 }
})
} }
}) this.uploadFile(this.image2)
} else {// evaluateRepairReject
this.$u.api.evaluateRepairReject(query_).then(res => {
if (res.code == 200) {
this.BetLoading.hide()
uni.showToast({ title: "提交成功", icon: "none" });
//
uni.navigateBack({
delta: 1 // 1
})
}
})
}
}, },
toPop1() { toPop1() {
this.$refs.signature1.toPop() this.$refs.signature1.toPop()
}, },
//
uploadFile(filePath) {
const token = uni.getStorageSync("token")
uni.uploadFile({
url: website.baseUrl + "/blade-resource/oss/endpoint/put-file", //
filePath: filePath,
name: "file", //
header: {
'Blade-Auth': 'bearer ' + token,
'Authorization': `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
'blade-requested-with': 'BladeHttpRequest' //
},
formData: {},
success: (res) => {
let info = JSON.parse(res.data);
console.log("上传成功", info); //
//
let query_ = {
id: this.id, //id
isOkQuality: this.questionList[0].type, // 0- 1-
isOkSecure: this.questionList[1].type, // 0- 1-
isOkValidity: this.questionList[2].type, // 0- 1-
signatureUrl: info.data.link, //
signaturePerson: this.userInfo.user_name, //
signatureTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()), //
}
this.$u.api.evaluateSign(query_).then(res => {
if (res.code == 200) {
this.BetLoading.hide()
uni.showToast({ title: "评价成功", icon: "none" });
//
uni.navigateBack({
delta: 1 // 1
})
}
})
},
error: (uploadFileRes) => {
console.log("上传失败", uploadFileRes.data); //
this.BetLoading.hide()
},
});
}
} }
} }
</script> </script>

@ -18,6 +18,7 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
}, },
@ -37,6 +38,6 @@ export default {
background: #efefef; background: #efefef;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
</style> </style>

@ -1,6 +1,6 @@
<template> <template>
<view class="page-css"> <view class="page-css">
<betone-list :tabList="tabList" type="submission"></betone-list> <betone-list :tabList="tabList" type="submission" ref="tablist"></betone-list>
<!-- <betone-tabbar ref="tabbarRef" /> --> <!-- <betone-tabbar ref="tabbarRef" /> -->
</view> </view>
@ -27,7 +27,7 @@ export default {
name: "待维修", name: "待维修",
key: "1,2,3", key: "1,2,3",
}, },
{ {
name: "确认方案", name: "确认方案",
key: "4", key: "4",
@ -59,8 +59,15 @@ export default {
onPullDownRefresh() { onPullDownRefresh() {
uni.$emit('onPullDownRefresh'); uni.$emit('onPullDownRefresh');
}, },
onBackPress() {
uni.reLaunch({
url: '/pages/home/index'
})
return true;
},
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tablist.getRecordsList()
// this.$refs.tabbarRef.getPermission(); // this.$refs.tabbarRef.getPermission();
}); });

@ -2,30 +2,8 @@
<view class="page-css" <view class="page-css"
:style="{ 'padding-bottom': (detailForm.status == 5 && dataTypes == 1) ? '180rpx' : '20rpx' }"> :style="{ 'padding-bottom': (detailForm.status == 5 && dataTypes == 1) ? '180rpx' : '20rpx' }">
<view class=""> <view class="">
<view class="status_box" v-if="detailForm.status != 2">
<view class="status_top">
<text class="status_txt">
{{ detailForm.status == 0 ? '待接单' :
detailForm.status == 2 ? '待维修' : detailForm.status == 3 ? '维修中' : (detailForm.status == 4 ||
detailForm.status == 5) ? '维修完成' : '维修完成' }}</text>
<view class="load_more">
<!-- <text class="load_more_txt">查看更多</text>
<image style="transform: rotate(90deg);width: 40rpx;height: 40rpx;"
:src="require('@/static/images/loadmore.png')" alt="" /> -->
</view>
</view>
<view class="status_bottom">
<text class="status_tip">
{{ detailForm.status == 0 ? '【待接单】当前工单等待接单中' : (detailForm.status == 2) ? '【待维修】当前工单等待维修中' :
(detailForm.status == 3 || detailForm.status == 4) ? '【维修中】维修人员正在进行维修' : '【维修完成】维修完成,请尽快完成评价' }}
</text>
<text class="status_date">{{ detailForm.createTime && detailForm.createTime.substring(0, 10)
}}</text>
</view>
</view>
<view class="repair_detail"> <view class="repair_detail">
<view class="repair_title">故障详情</view> <view class="repair_title">{{ dataTypes == 1 ? '故障信息' : '故障详情' }}</view>
<view class="detail_item"> <view class="detail_item">
<text class="item_left_txt">故障描述</text> <text class="item_left_txt">故障描述</text>
<text class="item_right_txt reason">{{ detailForm.faultDescribe }}</text> <text class="item_right_txt reason">{{ detailForm.faultDescribe }}</text>
@ -60,8 +38,9 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 维修详情 -->
<view class="repair_detail" <view class="repair_detail"
v-if="detailForm.status == 4 || detailForm.status == 5 || detailForm.status == '6'"> v-if="(dataTypes == 1 || dataTypes == 2) && (detailForm.status == 5||detailForm.status == 6 || detailForm.status == 7 || detailForm.status == 8 || detailForm.status == 9) || (dataTypes == 4 && !(detailForm.status == 0||detailForm.status == 1||detailForm.status == 2)) || (dataTypes == 3) && (detailForm.closeReason == '')">
<view class="repair_title">维修详情</view> <view class="repair_title">维修详情</view>
<view class="detail_item"> <view class="detail_item">
<text class="item_left_txt">维修人</text> <text class="item_left_txt">维修人</text>
@ -106,15 +85,46 @@
</view> </view>
</view> </view>
<!-- 关闭详情 --> <!-- 关闭详情 -->
<view class="repair_detail" v-if="detailForm.status == 9"> <view class="repair_detail" v-if="detailForm.closeReason != ''">
<view class="repair_title">关闭详情</view> <view class="repair_title">关闭详情</view>
<view class="detail_item"> <view class="detail_item">
<text class="item_left_txt">关闭原因</text> <text class="item_left_txt">关闭原因</text>
<text class="item_right_txt">{{ detailForm.cloneReason }}</text> <text class="item_right_txt">{{ detailForm.closeReason }}</text>
</view> </view>
</view> </view>
<!-- 驳回 -->
<view class="repair_detail" v-if="detailForm.status != 2"> <view class="repair_detail" v-if="detailForm.repaiRejectReason != ''">
<view class="repair_title">驳回详情</view>
<view class="detail_item">
<text class="item_left_txt">驳回原因</text>
<text class="item_right_txt">{{ detailForm.repaiRejectReason }}</text>
</view>
</view>
<!-- 主管审批 审批详情 -->
<view class="repair_detail" v-if="detailForm.approveResult >=0">
<view class="repair_title">主管审批</view>
<view class="detail_item">
<text class="item_left_txt">审批结果</text>
<text class="item_right_txt">{{ detailForm.approveResult == 1 ? '通过' : '驳回' }}</text>
</view>
<view class="detail_item">
<text class="item_left_txt">审批意见</text>
<text class="item_right_txt">{{ detailForm.approveRemark }}</text>
</view>
</view>
<!-- 客户审批 审批详情 -->
<view class="repair_detail" v-if="detailForm.approveResult >=0">
<view class="repair_title">客户审批</view>
<view class="detail_item">
<text class="item_left_txt">审批结果</text>
<text class="item_right_txt">{{ detailForm.approveResult == 1 ? '通过' : '驳回' }}</text>
</view>
<view class="detail_item">
<text class="item_left_txt">审批意见</text>
<text class="item_right_txt">{{ detailForm.approveRemark }}</text>
</view>
</view>
<view class="repair_detail" v-if="detailForm.status != -1">
<view class="repair_title">其他信息</view> <view class="repair_title">其他信息</view>
<view class="detail_item"> <view class="detail_item">
<text class="item_left_txt">提报人</text> <text class="item_left_txt">提报人</text>
@ -141,106 +151,15 @@
<text class="item_right_txt reason">{{ detailForm.customerOpinion }}</text> <text class="item_right_txt reason">{{ detailForm.customerOpinion }}</text>
</view> </view>
</view> </view>
<!-- 维修按钮 并且是维修人员角色 进来显示 --> <!-- -->
<view class="repair_detail" v-if="detailForm.status == 3 && dataTypes == 4"> <view class="repair_detail" v-if="(detailForm.status != 1) && dataTypes == 4">
<view class="repair_title">处理情况</view> <view class="repair_title">处理情况</view>
<view class="detail_item"> <view class="detail_item">
<text class="item_left_txt">接单时间</text> <text class="item_left_txt">接单时间</text>
<text class="item_right_txt reason">2024/8/20 9:25:30</text> <text class="item_right_txt reason">2024/8/20 9:25:30</text>
</view> </view>
</view> </view>
<view class="repair_detail" v-if="detailForm.status == 3 && dataTypes == 4">
<view class="repair_title">维修详情</view>
<u-form labelPosition="left" :rules="rules" ref="repairDetailsForm" :model="repairDetails"
:label-width="140" class="repair_form">
<u-form-item label="填报人:" prop="reportPeople" :border-bottom="false">
<betone-new-input :disabled="true" label="" v-model="repairDetails.reportPeople"
placeholder="请输入" />
</u-form-item>
<u-form-item label="设备名称:" prop="deviceName" :border-bottom="false">
<betone-new-input :disabled="true" label="" v-model="repairDetails.deviceName"
placeholder="请输入" />
</u-form-item>
<u-form-item label="故障原因:" prop="faultReason" :border-bottom="false" :isRequire="true">
<betone-new-input label="" v-model="repairDetails.faultReason" placeholder="请输入"
type="textarea" />
</u-form-item>
<u-form-item label="处理方法:" prop="dealMethods" :border-bottom="false" :isRequire="true">
<betone-new-input label="" v-model="repairDetails.dealMethods" placeholder="请输入"
type="textarea" />
</u-form-item>
<u-form-item label="是否申领物料:" prop="isMaterial" :border-bottom="false" :label-width="200"
:isRequire="true">
<uni-data-checkbox v-model="repairDetails.isMaterial"
:localdata="isMaterialList"></uni-data-checkbox>
</u-form-item>
</u-form>
<view class="selectForm clearfix" v-if="repairDetails.isMaterial == 1">
<view class="form-item form-label">维修材料:</view>
<view class="form-item">
<view class="select-box clearfix">
<view class="select-box-item clearfix" v-for="(item, index) in selectGoodsList"
:key="index">
<view class="material-text">名称{{ item.name }}</view>
<view class="material-text">规格{{ item.rule }}</view>
<view class="material-text">型号{{ item.xh }}</view>
<view class="material-text">数量{{ item.goodsNum }}</view>
<view class="material-text">单位{{ item.unit }}</view>
<view class="material-text">价格{{ item.brand }}</view>
</view>
</view>
<u-button size="medium" :plain="true" style="margin-right: 32rpx;width:100%" type="primary"
@click="goodsSelect()">{{ selectGoodsList.length > 0 ? '修改' : '添加' }}</u-button>
</view>
</view>
</view>
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="detailForm.status == 3 && dataTypes == 4">
<!-- <u-button size="medium">保存</u-button> -->
<u-button size="medium" type="primary" @click="repairSubmit()">提交</u-button>
</view>
</view> </view>
<view class="evaluate_box" v-if="detailForm.status == 5 && dataTypes == 1">
<view class="evaluate_btn">
评价
</view>
</view>
<!-- 物料选择 -->
<betone-dialog v-model="aterialShow" height="1300">
<view class="search-box">
<betone-new-input v-model="goodsearchInfo.goodsName" placeholder="搜索物品名称" icon="search"
style="margin-bottom: 32rpx" @changevalue="searchGoodsData()" />
</view>
<scroll-view class="scroll-Y" @scrolltolower="goodsLower" scroll-y="true"
style="max-height: 1000rpx; width: auto; background-color: gainsboro;">
<view class="material-box">
<view class="material-item" v-for="(item, index) in goodsTableData" :key="index">
<view class="title-wrapper">
<u-checkbox v-model="item.checked" shape="circle"></u-checkbox>
</view>
<view class="item-right">
<view class="material-title">
<text class="material-title-name">{{ item.name }}</text>
<text class="material-title-code">{{ item.code }}</text>
<text>库存数{{ item.num }}</text>
</view>
<view class="material-text">品牌{{ item.brand }}</view>
<view class="material-text">型号{{ item.xh }}</view>
<view class="material-num">
<text>参数{{ item.rule }}</text><u-number-box v-model="item.goodsNum"
:step="1"></u-number-box>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="material-btn">
<u-button size="medium" @click="aterialShow = false">取消</u-button>
<u-button size="medium" type="primary" @click="goodsSubmit()">确认</u-button>
</view>
</betone-dialog>
</view> </view>
</template> </template>
<script> <script>
@ -334,6 +253,18 @@ export default {
this.userInfo = uni.getStorageSync("userinfo"); this.userInfo = uni.getStorageSync("userinfo");
this.detailId = options.id this.detailId = options.id
this.getDetail() this.getDetail()
//
if (this.dataTypes == 1) {
uni.setNavigationBarTitle({
title: '需求详情' //
});
}
if (this.dataTypes == 2) {
uni.setNavigationBarTitle({
title: '工单详情' //
});
}
}, },
mounted() { mounted() {
@ -361,14 +292,6 @@ export default {
// //
repairSubmit() { repairSubmit() {
this.$refs.repairDetailsForm.setRules(this.rules); this.$refs.repairDetailsForm.setRules(this.rules);
//
// goodsType: item.bigClass, //
// goodsName: item.name, //
// goodsSize: item.rule, //
// goodsModel: item.rule, //
// goodsNum: item.goodsNum, //
// goodsUnit: item.unit, //
// goodsPrice: item.Price,
// this.repairDetailsForm // this.repairDetailsForm
this.$refs.repairDetailsForm.validate(valid => { this.$refs.repairDetailsForm.validate(valid => {

@ -5,59 +5,54 @@
<u-form labelPosition="left" :rules="rules" ref="repairDetailsForm" :model="repairDetails" <u-form labelPosition="left" :rules="rules" ref="repairDetailsForm" :model="repairDetails"
:label-width="200" class="repair_form"> :label-width="200" class="repair_form">
<u-form-item label="需求单号:" prop="requirementCode" :border-bottom="false"> <u-form-item label="需求单号:" prop="requirementCode" :border-bottom="false">
<!-- <u-input v-model="repairDetails.requirementCode" type="text" :border="true" /> -->
<betone-new-input label="" v-model="repairDetails.requirementCode" placeholder="请输入" <betone-new-input label="" v-model="repairDetails.requirementCode" placeholder="请输入"
:disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
<u-form-item label="提报单位:" prop="reportUnit" :border-bottom="false"> <u-form-item label="提报单位:" prop="reportUnit" :border-bottom="false">
<!-- <u-input v-model="repairDetails.reportUnit" type="text" :border="true" :disabled="disabled" /> -->
<betone-new-input label="" v-model="repairDetails.reportUnit" placeholder="请输入" <betone-new-input label="" v-model="repairDetails.reportUnit" placeholder="请输入"
:disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
<u-form-item label="故障现象描述:" prop="faultDescribe" :border-bottom="false"> <u-form-item label="故障现象描述:" prop="faultDescribe" :border-bottom="false">
<!-- <u-input v-model="repairDetails.faultDescribe" type="textarea" :border="true"
:disabled="disabled" /> -->
<betone-new-input label="" v-model="repairDetails.faultDescribe" placeholder="请输入" <betone-new-input label="" v-model="repairDetails.faultDescribe" placeholder="请输入"
:disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
<u-form-item label="故障位置:" prop="faultLocation" :border-bottom="false"> <u-form-item label="故障位置:" prop="faultLocation" :border-bottom="false">
<!-- <u-input v-model="repairDetails.faultLocation" type="text" :border="true" :disabled="disabled" /> -->
<betone-new-input label="" v-model="repairDetails.faultLocation" placeholder="请输入" <betone-new-input label="" v-model="repairDetails.faultLocation" placeholder="请输入"
:disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
<u-form-item label="设备名称:" prop="deviceName" :border-bottom="false"> <u-form-item label="设备名称:" prop="deviceName" :border-bottom="false">
<!-- <u-input v-model="repairDetails.deviceName" type="text" :border="true" :disabled="disabled" /> -->
<betone-new-input label="" v-model="repairDetails.deviceName" placeholder="请输入" <betone-new-input label="" v-model="repairDetails.deviceName" placeholder="请输入"
:disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
<u-form-item label="设备专业类型:" prop="faultType" :border-bottom="false"> <u-form-item label="设备专业类型:" prop="faultType" :border-bottom="false">
<!-- <u-input v-model="repairDetails.faultType" type="text" :border="true" :disabled="disabled" /> -->
<betone-new-input label="" v-model="repairDetails.faultType" placeholder="请输入" <betone-new-input label="" v-model="repairDetails.faultType" placeholder="请输入"
:disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
<view class="repair_detail"> <!-- 维修人员 接单展示-->
<view class="repair_detail"
v-if="(dataTypes == 4 || dataTypes == 2) && (detailForm.status == 1 || detailForm.status == 0)">
<view class="repair_title">派单信息</view> <view class="repair_title">派单信息</view>
<u-form labelPosition="left" :rules="sendRules" ref="sendOrderForm" :model="sendOrder" :label-width="200" <u-form labelPosition="left" :rules="sendRules" ref="sendOrderForm" :model="sendOrder" :label-width="200"
class="repair_form"> class="repair_form">
<u-form-item label="维修人员:" prop="name" :border-bottom="false" :required="true"> <u-form-item label="维修人员:" prop="name" :border-bottom="false" :required="true">
<u-input v-if="dataTypes == 2" v-model="sendOrder.name" type="select" :border="true" <u-input v-if="dataTypes == 2" v-model="sendOrder.name" type="select" :border="true"
@click="sendOrdersShow = true" :disabled="disabled" /> @click="sendOrdersShow = true" :disabled="disabled" />
<betone-new-input v-if="dataTypes == 4" label="" v-model="sendOrder.name" placeholder="请输入" <betone-new-input v-if="dataTypes == 4" label="" v-model="sendOrder.name" placeholder=""
:disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
<u-form-item label="计划完成时间:" prop="planCompleteTime" :border-bottom="false"> <u-form-item label="计划完成时间:" prop="planCompleteTime" :border-bottom="false">
<u-input v-if="dataTypes == 2" v-model="sendOrder.planCompleteTime" type="select" <u-input v-if="dataTypes == 2" v-model="sendOrder.planCompleteTime" type="select"
@click="calendarShow = true" :border="true" placeholder="请选择时间" :disabled="disabled" /> @click="calendarShow = true" :border="true" placeholder="请选择时间" :disabled="disabled" />
<betone-new-input v-if="dataTypes == 4" label="" v-model="sendOrder.planCompleteTime" <betone-new-input v-if="dataTypes == 4" label="" v-model="sendOrder.planCompleteTime" placeholder=""
placeholder="请输入" :disabled="disabled" /> :disabled="disabled" />
</u-form-item> </u-form-item>
<u-form-item label="客服意见:" prop="reportPeople" :border-bottom="false"> <u-form-item label="客服意见:" prop="reportPeople" :border-bottom="false">
<u-input v-if="dataTypes == 2" v-model="sendOrder.customerOpinion" type="textarea" :border="true" <u-input v-if="dataTypes == 2" v-model="sendOrder.customerOpinion" type="textarea" :border="true"
:disabled="disabled" /> :disabled="disabled" :height="120" />
<betone-new-input v-if="dataTypes == 4" label="" v-model="sendOrder.customerOpinion" <betone-new-input v-if="dataTypes == 4" label="" v-model="sendOrder.customerOpinion" placeholder=""
placeholder="请输入" :disabled="disabled" /> :disabled="disabled" type="textarea" :height="120" />
</u-form-item> </u-form-item>
<u-form-item v-if="dataTypes == 4" label="是否申领物料:" prop="isNeedMaterials" :border-bottom="false" <u-form-item v-if="dataTypes == 4" label="是否申领物料:" prop="isNeedMaterials" :border-bottom="false"
@ -77,7 +72,6 @@
<view class="material-text">型号{{ item.xh }}</view> <view class="material-text">型号{{ item.xh }}</view>
<view class="material-text">数量{{ item.goodsNum }}</view> <view class="material-text">数量{{ item.goodsNum }}</view>
<view class="material-text">单位{{ item.unit }}</view> <view class="material-text">单位{{ item.unit }}</view>
<view class="material-text">价格{{ item.brand }}</view>
</view> </view>
</view> </view>
<u-button size="medium" :plain="true" style="margin-right: 32rpx;width:100%" type="primary" <u-button size="medium" :plain="true" style="margin-right: 32rpx;width:100%" type="primary"
@ -85,22 +79,147 @@
</view> </view>
</view> </view>
<u-form-item v-if="dataTypes == 4" label="备注:" prop="remark" :border-bottom="false"> <u-form-item v-if="dataTypes == 4" label="备注:" prop="remark" :border-bottom="false">
<u-input v-model="sendOrder.remark" type="textarea" :border="true" /> <u-input v-model="sendOrder.remark" type="textarea" :border="true" :height="120" />
</u-form-item>
</u-form>
</view>
<!-- 维修人员 待提交维修方案 -->
<view class="repair_detail" v-if="dataTypes == 4 && detailForm.status == 2">
<view class="repair_title">处理情况</view>
<u-form labelPosition="left" ref="sendOrderForm" :model="detailForm" :label-width="200" class="repair_form">
<u-form-item label="接单时间:" prop="dispatchTime" :border-bottom="false">
<betone-new-input label="" v-model="detailForm.dispatchTime" placeholder="" :disabled="true" />
</u-form-item>
<u-form-item label="计划完成时间:" prop="planCompleteTime" :border-bottom="false">
<betone-new-input label="" v-model="detailForm.planCompleteTime" placeholder="" :disabled="true" />
</u-form-item>
<u-form-item label="客服意见:" prop="customerOpinion" :border-bottom="false">
<betone-new-input label="" v-model="detailForm.customerOpinion" placeholder="" :disabled="true"
type="textarea" :height="120" />
</u-form-item>
</u-form>
</view>
<!-- 维修详情 待提交维修方案 展示 -->
<view class="repair_detail"
v-if="(dataTypes == 4 && detailForm.status == 2) || (dataTypes == 3 && detailForm.status == 3)">
<view class="repair_title">维修详情</view>
<u-form labelPosition="left" :rules="repairInfoRules" ref="repairInfoForm" :model="repairInfo"
:label-width="140" class="repair_form">
<u-form-item label="维修人:" prop="reportPeople" :border-bottom="false">
<betone-new-input :disabled="true" label="" v-model="detailForm.repairPersonName" placeholder="" />
</u-form-item>
<u-form-item label="设备名称:" prop="deviceName" :border-bottom="false">
<betone-new-input :disabled="true" label="" v-model="detailForm.deviceName" placeholder="" />
</u-form-item>
<u-form-item label="故障原因:" prop="faultReason" :border-bottom="false" :required="true">
<betone-new-input label="" v-model="repairInfo.faultReason" placeholder="请输入" type="textarea"
:disabled="optionDisabled" />
</u-form-item>
<u-form-item label="处理方法:" prop="dealMethods" :border-bottom="false" :required="true">
<betone-new-input label="" v-model="repairInfo.dealMethods" placeholder="请输入" type="textarea"
:disabled="optionDisabled" />
</u-form-item>
<u-form-item label="是否申领物料:" prop="isMaterial" :border-bottom="false" :label-width="200"
:required="true">
<uni-data-checkbox :disabled="optionDisabled" v-model="repairInfo.isMaterial"
:localdata="isMaterialList"></uni-data-checkbox>
</u-form-item>
<view class="selectForm clearfix" v-if="repairInfo.isMaterial == 1">
<view class="form-item form-label">物料申领:</view>
<view class="form-item form-content">
<view class="select-box clearfix">
<view class="select-box-item clearfix" v-for="(item, index) in sendOrder.materialsData"
:key="index">
<view class="material-text">名称{{ item.name }}</view>
<view class="material-text">规格{{ item.rule }}</view>
<view class="material-text">型号{{ item.xh }}</view>
<view class="material-text">数量{{ item.goodsNum }}</view>
<view class="material-text">单位{{ item.unit }}</view>
<view class="material-text">价格{{ (dataTypes == 3 && detailForm.status ==
3) ? item.materialPrice : (item.unifiedQuotation * item.goodsNum) }}</view>
</view>
</view>
<u-button v-if="!optionDisabled" size="medium" :plain="true"
style="margin-right: 32rpx;width:100%" type="primary" @click="goodsSelect()">{{
sendOrder.materialsData.length > 0 ? '修改' : '添加' }}</u-button>
</view>
</view>
<block v-if="dataTypes == 3 && detailForm.status == 3&&repairInfo.isMaterial == 1">
<u-form-item label="总价:" prop="reportPeople" :border-bottom="false">
<view>{{ approveInfo.totalPrice }}</view>
</u-form-item>
<u-form-item label="折扣:" prop="reportPeople" :border-bottom="false">
<betone-new-input label="" v-model="approveInfo.discount" placeholder="" type="number"
@changevalue="changDiscount" />
</u-form-item>
<u-form-item label="折扣后的金额:" prop="reportPeople" :border-bottom="false" :label-width="240">
<view>{{ approveInfo.discountPrice }}</view>
</u-form-item>
</block>
</u-form>
</view>
<!-- 维修负责人 审批 -->
<view class="repair_detail" v-if="dataTypes == 3 && detailForm.status == 3">
<view class="repair_title">主管审批</view>
<u-form labelPosition="left" ref="repairInfoForm" :model="approveInfo" :label-width="140"
class="repair_form">
<u-form-item label="审批结果:" prop="reportPeople" :border-bottom="false">
<betone-input-picker :label="''" :pickerData="approveType" :mode="'selector'" :keyName="'text'"
@changeSelect="changeApproveResult" v-model="approveInfo.approveText"></betone-input-picker>
</u-form-item>
<u-form-item label="审批意见:" prop="reportPeople" :border-bottom="false">
<betone-new-input label="" v-model="approveInfo.approveRemark" placeholder="请输入" type="textarea"
:height="120" />
</u-form-item>
</u-form>
</view>
<!-- 客户 审批 确认维修方案 -->
<view class="repair_detail" v-if="dataTypes == 1 && detailForm.status == 4">
<view class="repair_title">客户审批</view>
<u-form labelPosition="left" ref="repairInfoForm" :model="clientInfo" :label-width="140"
class="repair_form">
<u-form-item label="审批结果:" prop="reportPeople" :border-bottom="false">
<betone-input-picker :label="''" :pickerData="approveType" :mode="'selector'" :keyName="'text'"
@changeSelect="changeClientResult" v-model="clientInfo.approveText"></betone-input-picker>
</u-form-item> </u-form-item>
<u-form-item label="审批意见:" prop="reportPeople" :border-bottom="false">
<betone-new-input label="" v-model="clientInfo.approveRemark" placeholder="请输入" type="textarea"
:height="120" />
</u-form-item>
</u-form> </u-form>
</view> </view>
<!-- btns --> <!-- 客服派单-->
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 2"> <view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 2 && detailForm.status == 0">
<u-button size="medium" @click="endOrderCancel()">取消</u-button> <u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="sendOrderSubmit()">确定派单</u-button> <u-button size="medium" type="primary" @click="sendOrderSubmit()">确定派单</u-button>
</view> </view>
<view class="repair-4-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 4"> <!-- 维修人员接单-->
<view class="repair-4-btn" style="margin-right: 32rpx;width:100%"
v-if="dataTypes == 4 && detailForm.status == 1">
<u-button size="medium" @click="endOrderCancel()">取消</u-button> <u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" @click="turnShow = true">驳回</u-button> <u-button size="medium" @click="turnShow = true">驳回</u-button>
<u-button size="medium" type="primary" @click="repairOrderSubmit()">确定派单</u-button> <u-button size="medium" type="primary" @click="repairOrderSubmit()">确认接单</u-button>
</view>
<!-- 维修人员 提交维修方案 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 4 && detailForm.status == 2">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="servicemanSubmit()">提交</u-button>
</view>
<!-- 维修负责人 审批 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 3 && detailForm.status == 3">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="approveSubmit()">提交</u-button>
</view>
<!-- 客户确认维修方案 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 1 && detailForm.status == 4">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="customerSubmit()">提交</u-button>
</view> </view>
<!-- 选择维修人员 --> <!-- 选择维修人员 -->
<u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true" <u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true"
value-name="id" title="选择维修人员"></u-select> value-name="id" title="选择维修人员"></u-select>
@ -145,11 +264,12 @@
</betone-dialog> </betone-dialog>
<!-- 维修人员驳回 --> <!-- 维修人员驳回 -->
<betone-modal v-model="turnShow" :title="'驳回原因'" @confirm="turnFn"> <betone-modal v-model="turnShow" :title="'驳回原因'" @confirm="turnFn" @cancel="turnShow = false">
<view class="modal-text"> <view class="modal-text">
<betone-new-input v-model="repaiRejectReason" placeholder="请输入" style="margin-bottom: 32rpx" /> <betone-new-input v-model="repaiRejectReason" placeholder="请输入" style="margin-bottom: 32rpx" />
</view> </view>
</betone-modal> </betone-modal>
<betone-loading ref="BetLoading" />
</view> </view>
</template> </template>
<script> <script>
@ -162,7 +282,10 @@ export default {
}, },
disabled() { disabled() {
return this.$store.state.dataType == 2 ? false : true return this.$store.state.dataType == 2 ? false : true
} },
optionDisabled() {
return this.$store.state.dataType == 3 && this.detailForm.status == 3 ? true : false
},
}, },
data() { data() {
@ -229,10 +352,64 @@ export default {
isGoodsNomore: false, isGoodsNomore: false,
turnShow: false,// turnShow: false,//
repaiRejectReason: '',// repaiRejectReason: '',//
repairInfo: {//
reportPeople: '',//
deviceName: '',//
faultReason: '',//
dealMethods: '',//
isMaterial: null,//
materialTable: [],//
},
repairInfoRules: {
faultReason: [
{
type: "string",
required: true,
message: "请输入",
trigger: ["blur", "change"],
}
],
dealMethods: [
{
type: "string",
required: true,
message: "请输入",
trigger: ["blur", "change"],
}
],
},
approveInfo: {//
discount: null,//
discountPrice: null,//
totalPrice: null,//
approvePerson: '',// id
approveRemark: '',//
approveResult: null,//1 0
approveText: '',//
approveTime: '',//
},
approveType: [
{
text: '通过',
value: 1
},
{
text: '驳回',
value: 0
},
],
clientInfo: {
approvePerson: '',// id
approveRemark: '',//
approveResult: null,//1 0
approveText: '',//
approveTime: '',//
}
} }
}, },
onReady() { onReady() {
this.$refs.sendOrderForm.setRules(this.sendRules);
}, },
onShow() { onShow() {
this.getRepairPersons()// this.getRepairPersons()//
@ -261,8 +438,24 @@ export default {
this.sendOrder.planCompleteTime = this.detailForm.planCompleteTime.split(' ')[0] this.sendOrder.planCompleteTime = this.detailForm.planCompleteTime.split(' ')[0]
this.sendOrder.customerOpinion = this.detailForm.customerOpinion this.sendOrder.customerOpinion = this.detailForm.customerOpinion
this.sendOrder.remark = this.detailForm.remark this.sendOrder.remark = this.detailForm.remark
// repairPersonName
//
this.repairInfo.faultReason = this.detailForm.faultCause
this.repairInfo.dealMethods = this.detailForm.processMethod
this.repairInfo.isMaterial = this.detailForm.isNeedMaterial
this.sendOrder.materialsData = this.detailForm.materials
let data = 0
if (this.detailForm.materials.length > 0) {
this.detailForm.materials.forEach(item => {
data = data + item.materialPrice
console.log(1111111, item.materialPrice)
item.goodsNum = item.materialCount
item.name = item.materialName
})
}
//
this.approveInfo.totalPrice = data
} }
}) })
@ -292,11 +485,12 @@ export default {
delta: 1 // 1退 delta: 1 // 1退
}) })
}, },
// //
sendOrderSubmit() { sendOrderSubmit() {
this.$refs.sendOrderForm.setRules(this.sendRules);
this.$refs.sendOrderForm.validate(valid => { this.$refs.sendOrderForm.validate(valid => {
if (valid) { if (valid) {
let query = { let updayeQuery = {
id: this.orderId, id: this.orderId,
reportUnit: this.repairDetails.reportUnit, reportUnit: this.repairDetails.reportUnit,
faultDescribe: this.repairDetails.faultDescribe, faultDescribe: this.repairDetails.faultDescribe,
@ -304,20 +498,33 @@ export default {
faultType: this.repairDetails.faultType, faultType: this.repairDetails.faultType,
deviceName: this.repairDetails.deviceName, deviceName: this.repairDetails.deviceName,
dispatchTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()), dispatchTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),
status: this.dataTypes == 2 ? 2 : this.dataTypes == 3 ? 2 : this.dataTypes == 4 ? 3 : '',
remark: this.repairDetails.remark, remark: this.repairDetails.remark,
}
let sendOrderQuery_ = {
id: this.orderId,
repairPerson: this.sendOrder.repairPerson, repairPerson: this.sendOrder.repairPerson,
planCompleteTime: this.sendOrder.planCompleteTime ? this.sendOrder.planCompleteTime + ' 00:00:00' : '', planCompleteTime: this.sendOrder.planCompleteTime ? this.sendOrder.planCompleteTime + ' 00:00:00' : '',
remark: this.repairDetails.remark,
customerOpinion: this.sendOrder.customerOpinion customerOpinion: this.sendOrder.customerOpinion
} }
this.$u.api.editData(query).then(res => {
this.$u.api.workOrderupdate(updayeQuery).then(res => {
this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "派单成功", icon: "none" }); this.$u.api.serviceman(sendOrderQuery_).then(res => {
uni.navigateBack({ if (res.code == 200) {
delta: 1 // 1退 uni.showToast({ title: "派单成功", icon: "none" });
uni.navigateBack({
delta: 1 // 1退
})
}
}) })
} }
}).catch(err => {
this.BetLoading.hide();
}) })
} else { } else {
console.log('验证失败'); console.log('验证失败');
} }
@ -388,18 +595,8 @@ export default {
}) })
} }
}, },
// //
repairOrderSubmit() { repairOrderSubmit() {
let query = {
id: this.orderId,
reportUnit: this.repairDetails.reportUnit,
dispatchTime: this.detailForm.dispatchTime,
planCompleteTime: this.detailForm.planCompleteTime,
repairPerson: null,
status: this.dataTypes == 2 ? 2 : this.dataTypes == 3 ? 2 : this.dataTypes == 4 ? 3 : '',
remark: this.sendOrder.remark,
customerOpinion: this.detailForm.customerOpinion
}
// //
if (this.sendOrder.isNeedMaterials == 1 && this.sendOrder.materialsData.length <= 0) { if (this.sendOrder.isNeedMaterials == 1 && this.sendOrder.materialsData.length <= 0) {
uni.showToast({ title: "请选择需要的申领材料", icon: "none" }); uni.showToast({ title: "请选择需要的申领材料", icon: "none" });
@ -410,38 +607,57 @@ export default {
uni.showToast({ title: "申领数量不能为0", icon: "none" }); uni.showToast({ title: "申领数量不能为0", icon: "none" });
return false return false
} }
let data = [] this.BetLoading.show();
console.log('this.materialsData', this.sendOrder.materialsData) if (this.sendOrder.isNeedMaterials == 1) {
this.sendOrder.materialsData.map(item => { let data = []
data.push({ this.sendOrder.materialsData.map(item => {
productId: item.productName,//id data.push({
productName: item.name, // inventoryId: item.inventoryId,//id
brand: item.brand,// productName: item.name, //
xh: item.xh,// brand: item.brand,//
rule: item.rule,// xh: item.xh,//
applyNum: item.applyNum,// rule: item.rule,//
applyNum: item.applyNum,//
})
}) })
}) //
let query1 = { let query1 = {
details: data, details: data,
applyUserId: this.userInfo.user_id, //Id applyUserId: this.userInfo.user_id, //Id
applyUser: this.userInfo.user_name, // applyUser: this.userInfo.user_name, //
applyTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//(yyyy-MM-dd HH:mm:ss) applyTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//(yyyy-MM-dd HH:mm:ss)
status: 0, status: 0,
workId: this.orderId, workId: this.orderId,
} }
this.$u.api.applySave(query1).then(res => { this.$u.api.applySave(query1).then(res => {
}) })
}
this.$u.api.editData(query).then(res => { let query_ = {
id: this.orderId
}
this.$u.api.servicemanReceive(query_).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "派单成功", icon: "none" }); uni.showToast({ title: "确认成功", icon: "none" });
uni.navigateBack({ uni.navigateBack({
delta: 1 // 1退 delta: 1 // 1退
}) })
} }
}) })
// this.$u.api.editData(query).then(res => {
// if (res.code == 200) {
// uni.showToast({ title: "", icon: "none" });
// uni.navigateBack({
// delta: 1 // 1退
// })
// }
// })
}, },
// //
turnFn() { turnFn() {
@ -464,7 +680,192 @@ export default {
} }
}) })
}, },
//
servicemanSubmit() {
this.$refs.repairInfoForm.setRules(this.repairInfoRules);
//
// this.repairInfoForm
this.$refs.repairInfoForm.validate(valid => {
if (valid) {
if (this.repairInfo.isMaterial == null) {
uni.showToast({ title: "是否申领物料", icon: "none" });
return false
}
if (this.repairInfo.isMaterial == 1 && this.sendOrder.materialsData.length <= 0) {
uni.showToast({ title: "请选择需要申领的物料信息", icon: "none" });
return false
}
//
if (this.sendOrder.materialsData.find(item => item.goodsNum == 0)) {
uni.showToast({ title: "申领数量不能为0", icon: "none" });
return false
}
let data = []
if (this.repairInfo.isMaterial == 1) {
this.sendOrder.materialsData.map(item => {
data.push({
inventoryId: item.inventoryId,//id
materialName: item.name, //
brand: item.brand,//
xh: item.xh,//
rule: item.rule,//
materialPrice: item.goodsNum * item.unifiedQuotation,
materialCount: item.goodsNum,//
orderId: this.detailForm.id,
})
})
}
let query = {
id: this.detailForm.id,
faultCause: this.repairInfo.faultReason,
processMethod: this.repairInfo.dealMethods,
isNeedMaterial: this.repairInfo.isMaterial,
materials: data
}
this.$u.api.workOrderupdate(query).then(res => {
if (res.code == 200) {
let query1 = {
id: this.detailForm.id
}
this.$u.api.servicemanSubmit(query1).then(res => {
if (res.code == 200) {
uni.showToast({ title: "提交成功", icon: "none" });
setTimeout(() => {
uni.navigateBack({
delta: 1 // 1退
})
}, 500)
}
})
}
})
}
})
},
//
changDiscount(e) {
this.approveInfo.discountPrice = (e / 10) * this.approveInfo.totalPrice
},
changeApproveResult(e) {
this.approveInfo.approveText = this.approveType[e].text
this.approveInfo.approveResult = this.approveType[e].value
},
//
approveSubmit() {
//
let query_ = {
discount: this.approveInfo.discount,
discountPrice: this.approveInfo.discountPrice,
id: this.detailForm.id,
totalPrice: this.approveInfo.totalPrice,
}
//
let query1 = {
id: this.detailForm.id,
approvePerson: this.userInfo.user_id,// id
approveRemark: this.approveInfo.approveRemark,//
approveResult: this.approveInfo.approveResult,//1 0
approveTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//
}
if (!this.approveInfo.discount&&this.repairInfo.isMaterial == 1) {
uni.showToast({ title: "请填写折扣信息", icon: "none" });
return false
}
if (this.approveInfo.approveResult == null) {
uni.showToast({ title: "请选择审批结果", icon: "none" });
return false
}
if (!this.approveInfo.approveRemark) {
uni.showToast({ title: "请选择审批意见", icon: "none" });
return false
}
this.$u.api.workOrderupdate(query_).then(res => {
if (res.code == 200) {
if (this.approveInfo.approveResult == 1) {
this.$u.api.supervisorconfirm(query1).then(res => {
if (res.code == 200) {
uni.showToast({ title: "审核成功", icon: "none" });
setTimeout(() => {
uni.navigateBack({
delta: 1 // 1退
})
}, 500)
}
})
} else {
this.$u.api.supervisorReject(query1).then(res => {
if (res.code == 200) {
uni.showToast({ title: "驳回成功", icon: "none" });
setTimeout(() => {
uni.navigateBack({
delta: 1 // 1退
})
}, 500)
}
})
}
}
})
},
//
changeClientResult(e) {
this.clientInfo.approveText = this.approveType[e].text
this.clientInfo.approveResult = this.approveType[e].value
},
//
customerSubmit() {
if (this.clientInfo.approveResult == null) {
uni.showToast({ title: "请选择审批结果", icon: "none" });
return false
}
if (!this.clientInfo.approveRemark) {
uni.showToast({ title: "请选择审批意见", icon: "none" });
return false
}
//
let query1 = {
id: this.detailForm.id,
approvePerson: this.userInfo.user_id,// id
approveRemark: this.clientInfo.approveRemark,//
approveResult: this.clientInfo.approveResult,//1 0
approveTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//
}
if (this.clientInfo.approveResult == 1) {//
this.$u.api.customerConfirm(query1).then(res => {
if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" });
setTimeout(() => {
uni.navigateBack({
delta: 1 // 1退
})
}, 500)
}
})
} else {//
this.$u.api.customerReject(query1).then(res => {
if (res.code == 200) {
uni.showToast({ title: "驳回成功", icon: "none" });
setTimeout(() => {
uni.navigateBack({
delta: 1 // 1退
})
}, 500)
}
})
}
},
//
initDate() { initDate() {
let date = new Date(); let date = new Date();
@ -496,7 +897,7 @@ export default {
//this.maxDate = year  + '-'+ month +'-' + day; // //this.maxDate = year  + '-'+ month +'-' + day; //
}, },
} }
} }
@ -669,5 +1070,8 @@ export default {
} }
} }
/deep/.arrow {
top: 12rpx;
}
} }
</style> </style>

@ -0,0 +1,28 @@
import { mapState } from 'vuex'
import store from "@/store"
let StoreKey = [];
try{
StoreKey = store.state ? Object.keys(store.state) : [];
}catch(e){
}
module.exports = {
beforeCreate() {
// 将vuex方法挂在到$u中
// 使用方法为:如果要修改vuex的state中的user.name变量为"史诗" => this.$u.vuex('user.name', '史诗')
// 如果要修改vuex的state的version变量为1.0.1 => this.$u.vuex('version', '1.0.1')
this.$u.vuex = (name, value) => {
this.$store.commit('$uStore', {
name,value
})
}
},
computed: {
BetLoading() {
return this.$refs.BetLoading
},
// 将vuex的state中的所有变量,解构到全局混入的mixin中
...mapState(StoreKey),
}
}
Loading…
Cancel
Save