维修app修改bug
This commit is contained in:
parent
85defcaac3
commit
10225d612c
@ -12,7 +12,7 @@
|
|||||||
<!-- <u-checkbox-group-->
|
<!-- <u-checkbox-group-->
|
||||||
<!-- placement="column"-->
|
<!-- placement="column"-->
|
||||||
<!-- v-model="checked">-->
|
<!-- v-model="checked">-->
|
||||||
<radio-group @change="radioChange" v-if="type == 'xs'">
|
<radio-group @change="radioChange" v-if="type == 'xs' || !type">
|
||||||
<label v-for="(item, index) in list" :key="item.userId" class="userItem">
|
<label v-for="(item, index) in list" :key="item.userId" class="userItem">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="name">{{ item.userName }}</text>
|
<text class="name">{{ item.userName }}</text>
|
||||||
@ -70,16 +70,16 @@ export default {
|
|||||||
checkedUserId: "",
|
checkedUserId: "",
|
||||||
checkedUserName: "",
|
checkedUserName: "",
|
||||||
ifDetail: false,
|
ifDetail: false,
|
||||||
type: "sg",
|
type: "",
|
||||||
sgIds: [], // 初始化为数组
|
sgIds: [], // 初始化为数组
|
||||||
sgNames : [],
|
sgNames : [],
|
||||||
xsId: [],
|
projectId: ''
|
||||||
xsName: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(data) {
|
onLoad(data) {
|
||||||
console.log("data", data)
|
console.log("data", data)
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
|
console.log('执行了派单')
|
||||||
this.ticketId = data.id
|
this.ticketId = data.id
|
||||||
this.workByTicketId()
|
this.workByTicketId()
|
||||||
}
|
}
|
||||||
@ -99,6 +99,9 @@ export default {
|
|||||||
if (data.ticketId) {
|
if (data.ticketId) {
|
||||||
this.ticketId = data.ticketId
|
this.ticketId = data.ticketId
|
||||||
}
|
}
|
||||||
|
if (data.projectId) {
|
||||||
|
this.projectId = data.projectId
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
radioChange: function (evt) {
|
radioChange: function (evt) {
|
||||||
@ -124,6 +127,11 @@ export default {
|
|||||||
this.list.map((item) => {
|
this.list.map((item) => {
|
||||||
item.userName = item.name
|
item.userName = item.name
|
||||||
})
|
})
|
||||||
|
if (this.list.length > 0) {
|
||||||
|
console.log(this.list[0].userId)
|
||||||
|
this.checkedUserId = this.list[0].userId
|
||||||
|
this.checkedUserName = this.list[0].userName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -157,6 +165,11 @@ export default {
|
|||||||
this.list.map((item) => {
|
this.list.map((item) => {
|
||||||
item.workTypeText = getDictTextByCodeAndValue('repair_work_type', item.workType)
|
item.workTypeText = getDictTextByCodeAndValue('repair_work_type', item.workType)
|
||||||
})
|
})
|
||||||
|
if (this.list.length > 0) {
|
||||||
|
console.log(this.list[0].userId)
|
||||||
|
this.checkedUserId = this.list[0].userId
|
||||||
|
this.checkedUserName = this.list[0].userName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cs(e){
|
cs(e){
|
||||||
@ -188,10 +201,10 @@ export default {
|
|||||||
//以逗号拼接
|
//以逗号拼接
|
||||||
const sgIds = this.sgIds.join(',')
|
const sgIds = this.sgIds.join(',')
|
||||||
const sgNames = this.sgNames.join(',')
|
const sgNames = this.sgNames.join(',')
|
||||||
console.log(sgIds)
|
console.log('this.projectId',this.projectId)
|
||||||
console.log(sgNames)
|
|
||||||
const param = {
|
const param = {
|
||||||
ticketId: this.ticketId,
|
ticketId: this.ticketId,
|
||||||
|
projectId: this.projectId,
|
||||||
repairIds: sgIds,
|
repairIds: sgIds,
|
||||||
repairNames: sgNames,
|
repairNames: sgNames,
|
||||||
}
|
}
|
||||||
@ -220,6 +233,7 @@ export default {
|
|||||||
//以逗号拼接
|
//以逗号拼接
|
||||||
const param = {
|
const param = {
|
||||||
ticketId: this.ticketId,
|
ticketId: this.ticketId,
|
||||||
|
projectId: this.projectId,
|
||||||
saleId: this.checkedUserId,
|
saleId: this.checkedUserId,
|
||||||
saleName: this.checkedUserName,
|
saleName: this.checkedUserName,
|
||||||
}
|
}
|
||||||
|
@ -349,7 +349,8 @@ export default {
|
|||||||
salesman: [],
|
salesman: [],
|
||||||
constructor: []
|
constructor: []
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
submitData:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(data) {
|
onLoad(data) {
|
||||||
@ -687,7 +688,7 @@ export default {
|
|||||||
console.log('proj', proj)
|
console.log('proj', proj)
|
||||||
})
|
})
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages-order/choosePeople/choosePeople?type=${type}&ticketId=${this.ticketId}`
|
url: `/pages-order/choosePeople/choosePeople?type=${type}&ticketId=${this.ticketId}&projectId=${proj.projectId}`
|
||||||
// url: `/pages-order/choosePeople/choosePeople?type=${type}&id=${this.ticketId}`
|
// url: `/pages-order/choosePeople/choosePeople?type=${type}&id=${this.ticketId}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -19,18 +19,10 @@
|
|||||||
<u-form-item borderBottom label="规格" labelWidth="200">
|
<u-form-item borderBottom label="规格" labelWidth="200">
|
||||||
<u-input v-model="project.spec" border="none" placeholder="请输入规格"></u-input>
|
<u-input v-model="project.spec" border="none" placeholder="请输入规格"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item borderBottom label="单位" labelWidth="200" @click="unitType = true;">
|
<u-form-item borderBottom label="单位" labelWidth="200">
|
||||||
<u-input
|
<picker @change="picker($event)" :value="arrayIndex" :range="unitList" range-key="label">
|
||||||
v-model="unit"
|
<view class="uni-input">{{ unitList[arrayIndex].label }}</view>
|
||||||
border="none"
|
</picker>
|
||||||
disabled
|
|
||||||
disabledColor="#ffffff"
|
|
||||||
placeholder="请选择单位"
|
|
||||||
></u-input>
|
|
||||||
<u-icon
|
|
||||||
slot="right"
|
|
||||||
name="arrow-right"
|
|
||||||
></u-icon>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item borderBottom label="工时" labelWidth="200">
|
<u-form-item borderBottom label="工时" labelWidth="200">
|
||||||
<u-input v-model="project.manHour" border="none" placeholder="请输入工时"></u-input>
|
<u-input v-model="project.manHour" border="none" placeholder="请输入工时"></u-input>
|
||||||
@ -39,10 +31,12 @@
|
|||||||
<u-input v-model="project.remark" border="none" placeholder="请输入备注"></u-input>
|
<u-input v-model="project.remark" border="none" placeholder="请输入备注"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item borderBottom label="是否自助" labelWidth="200">
|
<u-form-item borderBottom label="是否自助" labelWidth="200">
|
||||||
<switch v-model="project.isSelf" @change="handleSwitchChange('isSelf',project.isSelf)" style="transform:scale(0.7)"/>
|
<switch v-model="project.isSelf" @change="handleSwitchChange('isSelf',project.isSelf)"
|
||||||
|
style="transform:scale(0.7)"/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item borderBottom label="分店公用" labelWidth="200">
|
<u-form-item borderBottom label="分店公用" labelWidth="200">
|
||||||
<switch v-model="project.isPublic" @change="handleSwitchChange('isPublic',project.isPublic)" style="transform:scale(0.7)"/>
|
<switch v-model="project.isPublic" @change="handleSwitchChange('isPublic',project.isPublic)"
|
||||||
|
style="transform:scale(0.7)"/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
</u-form>
|
</u-form>
|
||||||
@ -69,6 +63,7 @@
|
|||||||
import VNavigationBar from "@/components/VNavigationBar.vue";
|
import VNavigationBar from "@/components/VNavigationBar.vue";
|
||||||
import {getDictByCode, convertToDouble} from "@/utils/utils";
|
import {getDictByCode, convertToDouble} from "@/utils/utils";
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
|
import {browser} from "@/unpackage/dist/dev/mp-weixin/common/vendor";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {VNavigationBar},
|
components: {VNavigationBar},
|
||||||
@ -82,6 +77,7 @@ export default {
|
|||||||
unitType: false,
|
unitType: false,
|
||||||
unitList: [],
|
unitList: [],
|
||||||
unit: '',
|
unit: '',
|
||||||
|
arrayIndex: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -93,6 +89,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
|
if (this.project.name == null || this.project.code == null || this.project.cost == null || this.project.price == null || this.project.spec == null || this.project.unit == null || this.project.manHour == null){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请完善信息',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if (this.project.cost != null) {
|
if (this.project.cost != null) {
|
||||||
this.project.cost = Math.floor(this.project.cost,)
|
this.project.cost = Math.floor(this.project.cost,)
|
||||||
}
|
}
|
||||||
@ -114,18 +117,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
picker(e) {
|
||||||
|
// 或者
|
||||||
|
this.arrayIndex = e.target.value;
|
||||||
|
this.project.unit = this.unitList[e.target.value].value
|
||||||
|
},
|
||||||
getDictByCode() {
|
getDictByCode() {
|
||||||
this.unitList = getDictByCode('repair_unit')
|
this.unitList = getDictByCode('repair_unit')
|
||||||
this.unitList.forEach(item => {
|
if (this.unitList.length > 0) {
|
||||||
item.name = item.label
|
this.project.unit = this.unitList[0].value
|
||||||
item.value = item.value
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
unitSelect(e) {
|
|
||||||
console.log('e', e)
|
|
||||||
this.brandId = e.value
|
|
||||||
this.unit = e.name
|
|
||||||
this.project.unit = e.value
|
|
||||||
},
|
},
|
||||||
costBlur(value) {
|
costBlur(value) {
|
||||||
this.project[value] = convertToDouble(this.project[value], 2)
|
this.project[value] = convertToDouble(this.project[value], 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user