维修app修改bug
This commit is contained in:
parent
85defcaac3
commit
10225d612c
@ -12,7 +12,7 @@
|
||||
<!-- <u-checkbox-group-->
|
||||
<!-- placement="column"-->
|
||||
<!-- 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">
|
||||
<view class="info">
|
||||
<text class="name">{{ item.userName }}</text>
|
||||
@ -70,16 +70,16 @@ export default {
|
||||
checkedUserId: "",
|
||||
checkedUserName: "",
|
||||
ifDetail: false,
|
||||
type: "sg",
|
||||
type: "",
|
||||
sgIds: [], // 初始化为数组
|
||||
sgNames : [],
|
||||
xsId: [],
|
||||
xsName: []
|
||||
projectId: ''
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
console.log("data", data)
|
||||
if (data.id) {
|
||||
console.log('执行了派单')
|
||||
this.ticketId = data.id
|
||||
this.workByTicketId()
|
||||
}
|
||||
@ -99,6 +99,9 @@ export default {
|
||||
if (data.ticketId) {
|
||||
this.ticketId = data.ticketId
|
||||
}
|
||||
if (data.projectId) {
|
||||
this.projectId = data.projectId
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
radioChange: function (evt) {
|
||||
@ -124,6 +127,11 @@ export default {
|
||||
this.list.map((item) => {
|
||||
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) => {
|
||||
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){
|
||||
@ -188,10 +201,10 @@ export default {
|
||||
//以逗号拼接
|
||||
const sgIds = this.sgIds.join(',')
|
||||
const sgNames = this.sgNames.join(',')
|
||||
console.log(sgIds)
|
||||
console.log(sgNames)
|
||||
console.log('this.projectId',this.projectId)
|
||||
const param = {
|
||||
ticketId: this.ticketId,
|
||||
projectId: this.projectId,
|
||||
repairIds: sgIds,
|
||||
repairNames: sgNames,
|
||||
}
|
||||
@ -220,6 +233,7 @@ export default {
|
||||
//以逗号拼接
|
||||
const param = {
|
||||
ticketId: this.ticketId,
|
||||
projectId: this.projectId,
|
||||
saleId: this.checkedUserId,
|
||||
saleName: this.checkedUserName,
|
||||
}
|
||||
|
@ -349,7 +349,8 @@ export default {
|
||||
salesman: [],
|
||||
constructor: []
|
||||
}
|
||||
]
|
||||
],
|
||||
submitData:[]
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
@ -687,7 +688,7 @@ export default {
|
||||
console.log('proj', proj)
|
||||
})
|
||||
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}`
|
||||
})
|
||||
},
|
||||
|
@ -19,18 +19,10 @@
|
||||
<u-form-item borderBottom label="规格" labelWidth="200">
|
||||
<u-input v-model="project.spec" border="none" placeholder="请输入规格"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item borderBottom label="单位" labelWidth="200" @click="unitType = true;">
|
||||
<u-input
|
||||
v-model="unit"
|
||||
border="none"
|
||||
disabled
|
||||
disabledColor="#ffffff"
|
||||
placeholder="请选择单位"
|
||||
></u-input>
|
||||
<u-icon
|
||||
slot="right"
|
||||
name="arrow-right"
|
||||
></u-icon>
|
||||
<u-form-item borderBottom label="单位" labelWidth="200">
|
||||
<picker @change="picker($event)" :value="arrayIndex" :range="unitList" range-key="label">
|
||||
<view class="uni-input">{{ unitList[arrayIndex].label }}</view>
|
||||
</picker>
|
||||
</u-form-item>
|
||||
<u-form-item borderBottom label="工时" labelWidth="200">
|
||||
<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-form-item>
|
||||
<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 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>
|
||||
</view>
|
||||
</u-form>
|
||||
@ -69,6 +63,7 @@
|
||||
import VNavigationBar from "@/components/VNavigationBar.vue";
|
||||
import {getDictByCode, convertToDouble} from "@/utils/utils";
|
||||
import request from "@/utils/request";
|
||||
import {browser} from "@/unpackage/dist/dev/mp-weixin/common/vendor";
|
||||
|
||||
export default {
|
||||
components: {VNavigationBar},
|
||||
@ -82,6 +77,7 @@ export default {
|
||||
unitType: false,
|
||||
unitList: [],
|
||||
unit: '',
|
||||
arrayIndex: 0,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@ -93,7 +89,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
if (this.project.cost != null){
|
||||
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) {
|
||||
this.project.cost = Math.floor(this.project.cost,)
|
||||
}
|
||||
console.log("this.project", this.project)
|
||||
@ -114,18 +117,16 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
picker(e) {
|
||||
// 或者
|
||||
this.arrayIndex = e.target.value;
|
||||
this.project.unit = this.unitList[e.target.value].value
|
||||
},
|
||||
getDictByCode() {
|
||||
this.unitList = getDictByCode('repair_unit')
|
||||
this.unitList.forEach(item => {
|
||||
item.name = item.label
|
||||
item.value = item.value
|
||||
})
|
||||
},
|
||||
unitSelect(e) {
|
||||
console.log('e', e)
|
||||
this.brandId = e.value
|
||||
this.unit = e.name
|
||||
this.project.unit = e.value
|
||||
if (this.unitList.length > 0) {
|
||||
this.project.unit = this.unitList[0].value
|
||||
}
|
||||
},
|
||||
costBlur(value) {
|
||||
this.project[value] = convertToDouble(this.project[value], 2)
|
||||
@ -133,8 +134,8 @@ export default {
|
||||
handleSwitchChange(name, value) {
|
||||
console.log(`${name} 状态改变:`, value);
|
||||
if (value == 1) {
|
||||
value =0
|
||||
}else {
|
||||
value = 0
|
||||
} else {
|
||||
value = 1
|
||||
}
|
||||
this.project[name] = value
|
||||
|
Loading…
Reference in New Issue
Block a user