Commit d996ca4f authored by 李超鹏's avatar 李超鹏

修改调试

parent 0fb93627
import { request } from '@/utils/request'
// 获取工单保存的特殊信息
export function getOrderSpecialInfo(orderId, itemName) {
return request({
url: '/wxh-cloud-rest/rest/thirdparty/order/' + orderId + '/' + itemName,
method: 'get'
})
}
// 工单上传图片接口 TODO
export function uploadImage(query) {
return request({
url: '/wxh-cloud-rest/rest/images/upload/{orderId}',
method: 'get',
params: query
})
}
import Mock from 'mockjs'
Mock.mock('/wxh-cloud-rest/rest/thirdparty/order/6099514/partnerInspectItem', /post|get/i, (config) => {
console.log(config)
return { code: 200, data: { powerType: '01', highPowerFlg: 'N', reportInstallFlg: 'Y', elecGroundType: '01', circuitBreakerWireSize: '10', circuitBreakerCapacity: '10', powerPointWireSize: '10', installableBreaker: '10', installableWireSize: '01', actualVoltage: '10', actualCurrent: '10', resistanceGround: '10', cableLen: '10', powerRoomPropertyRightType: '01', powerRoomChargingType: '01', propertyAgreementFlg: 'Y', openSlotLen: '10', highLen: '5', highWorkLen: '', installType: '01', portType: '01', signalType: ['01', '02', '03', '04'], inspectConclusionType: '01' }}
})
import { request } from '@/utils/request' import { request } from '@/utils/request'
// import { getToken } from '@/utils/auth'
// 获取工单对应的厂商工单的材料信息 // 获取工单对应的厂商工单的材料信息
export function get(orderId) { export function getMaterial(orderId) {
return request({ return request({
url: '/wxh-cloud-rest/rest/thirdparty/shzhida/material/' + orderId, url: '/wxh-cloud-rest/rest/thirdparty/shzhida/material/' + orderId,
method: 'get' method: 'get'
...@@ -21,18 +20,10 @@ export function uploadFile(orderId, data) { ...@@ -21,18 +20,10 @@ export function uploadFile(orderId, data) {
}) })
} }
// 保存信息
export function saveInfo(orderId) {
return request({
url: '/wxh-cloud-rest/rest/thirdparty/order/' + orderId,
method: 'get'
})
}
// 获取信息 // 获取信息
export function getInfo(orderId) { export function getOrderCustomizeInfo(orderId, itemName) {
return request({ return request({
url: '/wxh-cloud-rest/rest/thirdparty/shzhida/' + orderId, url: '/wxh-cloud-rest/rest/thirdparty/order/' + orderId + '/' + itemName,
method: 'get' method: 'get'
}) })
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="input-box more" v-else> <div class="input-box more" v-else>
<div class="item" v-for="(otherItem,index) in item.otherField" :key="index"> <div class="item" v-for="(otherItem,index) in item.otherField" :key="index">
<div class="txt">{{otherItem.label}}</div> <div class="txt">{{otherItem.label}}</div>
<input class="input" placeholder="请输入" v-modal = "otherItem.value"/> <input class="input" placeholder="请输入" v-model = "otherItem.value"/>
<div class="txt tail">{{otherItem.tail}}</div> <div class="txt tail">{{otherItem.tail}}</div>
</div> </div>
</div> </div>
......
...@@ -356,10 +356,14 @@ const inspectData = [{ ...@@ -356,10 +356,14 @@ const inspectData = [{
inputType: 'input', inputType: 'input',
required: false required: false
}, /* 开墙槽/孔*/ { }, /* 开墙槽/孔*/ {
fieldName: 'openPoreLen',
label: '开孔', label: '开孔',
otherField: [{ otherField: [{
fieldName: 'openPoreNum' fieldName: 'openPoreLen',
tail: 'mm'
},
{
fieldName: 'openPoreNum',
tail: '个'
}], }],
inputType: 'input', inputType: 'input',
required: false required: false
...@@ -480,12 +484,9 @@ const inspectData = [{ ...@@ -480,12 +484,9 @@ const inspectData = [{
}, { }, {
fieldName: 'signalType', fieldName: 'signalType',
label: '已覆盖最优信号', label: '已覆盖最优信号',
inputType: 'select', inputType: 'checkbox',
required: true, required: true,
settings: [{ value: '01', label: '电信' }, { value: '02', label: '移动' }, { value: '03', label: '联通' }, { settings: [{ value: '01', label: '电信' }, { value: '02', label: '移动' }, { value: '03', label: '联通' }, { value: '04', label: '无信号' }]
value: '03',
label: '无信号'
}]
}, { }, {
fieldName: 'inspectConclusionType', fieldName: 'inspectConclusionType',
label: '勘察结论', label: '勘察结论',
...@@ -505,9 +506,9 @@ const inspectData = [{ ...@@ -505,9 +506,9 @@ const inspectData = [{
const getData = function(type) { const getData = function(type) {
let result = [] let result = []
if (type === '安装') { if (type === 'partnerInstallItem') {
result = installData result = installData
} else if (type === '勘察') { } else if (type === 'partnerInspectItem') {
result = inspectData result = inspectData
} }
return result return result
......
...@@ -39,9 +39,10 @@ ...@@ -39,9 +39,10 @@
</template> </template>
<script> <script>
import { import {
getAppreciationService, getOrderCustomizeInfo,
getVap uploadFile,
} from '@/api/haier/order/service' getMaterial
} from '@/api/shzhida/order/service'
import { Toast, Indicator } from 'mint-ui' import { Toast, Indicator } from 'mint-ui'
import BScroll from 'better-scroll' import BScroll from 'better-scroll'
import { import {
...@@ -145,19 +146,7 @@ export default { ...@@ -145,19 +146,7 @@ export default {
}, },
created() { created() {
this.initPageData() this.initPageData()
// if (this.$route.query.orderId) { this.getOrderId()
// this.inApp = false
// this.getOrderId(this.$route.query.orderId)
// return
// }
// this.inApp = true
// window.getOrderId = this.getOrderId
// Indicator.open('加载中...')
// window.BanShou.callApp({
// methodName: 'getOrderId',
// parameters: '',
// jsCallBack: 'getOrderId'
// })
}, },
mounted() { mounted() {
...@@ -175,8 +164,7 @@ export default { ...@@ -175,8 +164,7 @@ export default {
dataList.map(item => { dataList.map(item => {
fieldNameArr.push(item.fieldName) fieldNameArr.push(item.fieldName)
}) })
formList.map(item => {
formatlist.map(item => {
const idx = fieldNameArr.indexOf(item.fieldName) const idx = fieldNameArr.indexOf(item.fieldName)
if (idx >= 0) { if (idx >= 0) {
item.value = dataList[idx].value item.value = dataList[idx].value
...@@ -184,13 +172,10 @@ export default { ...@@ -184,13 +172,10 @@ export default {
}) })
}, },
async getList() { async getList() {
const params = {
orderId: this.orderId
}
let txt = '' let txt = ''
const res = await getInfo(params) const res = await getOrderCustomizeInfo(this.orderId, this.type)
if (res.data.code !== 200) { if (res.data.code !== 200) {
txt = item.data.message txt = res.data.message
} else { } else {
this.formatlist(res.data.data) this.formatlist(res.data.data)
} }
...@@ -203,68 +188,26 @@ export default { ...@@ -203,68 +188,26 @@ export default {
}) })
return false return false
} }
// Promise.all([p1, p2]).then((result) => {
// result.map((item, index) => {
// if (item.data.code !== 200) {
// txt = item.data.message
// } else {
// this.formatlist(item.data.data)
// }
// })
// this.loading = false
// Indicator.close()
// if (txt !== '') {
// Toast({
// message: txt,
// duration: 3000
// })
// return false
// }
// this.$nextTick(() => {
// this._initScroll()
// this._calculateHeight()
// })
// }).catch((error) => {
// this.loading = false
// Indicator.close()
// console.log(error)
// })
}, },
submitInfo() { submitInfo() {
const data = {}
this.formList.map(item => {
item.content.map(element => {
data[element.fieldName] = element.value
})
})
console.log(JSON.stringify(data))
}, },
initPageData() { initPageData() {
const query = this.$route.query const query = this.$route.query
const { type } = query const { type } = query
this.type = type this.type = type
this.formList = getData(type) this.formList = getData(type)
// this.formList.map(item => {
// this.menuList.push(item.title)
// })
// this.$nextTick(() => {
// this.initScroll()
// })
}, },
changeMenu(item, index) { changeMenu(item, index) {
this.currentMenuIndex = index this.currentMenuIndex = index
// const contentBox = document.getElementsByClassName(
// 'content-box'
// )
// const el = contentBox[index]
// this.currentTime = new Date().getTime()
// console.log(contentBox, 'contentBox')
// this.scrollContent.scrollToElement(el, 0)
}, },
initScroll() { initScroll() {
// this.srcollMenu = new BScroll(this.$refs.menu, {
// probeType: 3,
// scrollX: true,
// scrollY: false,
// startX: 0,
// eventPassthrough: 'vertical',
// click: true
// })
console.log(this.$refs, 'refs')
this.scrollContent = new BScroll(this.$refs.container, { this.scrollContent = new BScroll(this.$refs.container, {
probeType: 3, probeType: 3,
click: true click: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment