施工完成1/2

This commit is contained in:
xiaofajia 2024-10-18 23:14:29 +08:00
parent e9fb87dec7
commit fdcc7367e3
3 changed files with 18 additions and 6 deletions

View File

@ -288,7 +288,7 @@ export default {
save(row) { save(row) {
// console.log(row) // console.log(row)
if (row.id) { if (row.id) {
row.itemStatus = (row.repair && this.itemType === 'project') ? "02" : "01" row.itemStatus = "01"
row.totalPrice = row.count * row.price * (row.discount / 10) row.totalPrice = row.count * row.price * (row.discount / 10)
} }
const id = row.id const id = row.id

View File

@ -50,13 +50,13 @@
<el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini" type="text" icon="el-icon-check" @click="handleNotify(scope.row)"> <el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini" type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
通知施工 通知施工
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgz')"> <el-button size="mini" v-if="userRole === 'repair_staff'" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgz')">
过程记录 过程记录
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'kssg')"> <el-button size="mini" v-if="userRole === 'repair_staff'" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'kssg')">
开始施工 开始施工
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')"> <el-button size="mini" v-if="userRole === 'repair_staff'" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
施工完成 施工完成
</el-button> </el-button>
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"> <el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)">

View File

@ -28,7 +28,11 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doUpdate"> </el-button> <el-button v-if="formData.recordType !== 'sgwczj'" type="primary" @click="doUpdate"> </el-button>
<el-button v-if="formData.recordType === 'sgwczj'" type="primary">部分完成</el-button>
<el-button v-if="formData.recordType === 'sgwczj'" type="success">
{{isNext ? "整体完成并指派下一项目" : (isEndCheck ? "整体完成并移交总检" : "整体完成")}}
</el-button>
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -63,6 +67,10 @@ export default {
}, },
formLoading: false, formLoading: false,
projectList: [], projectList: [],
//
isNext: false,
//
isEndCheck: true,
} }
}, },
methods:{ methods:{
@ -85,6 +93,7 @@ export default {
}, },
async open(row){ async open(row){
this.init() this.init()
this.isEndCheck = row.endCheck === '1'
this.formData.id = row.id this.formData.id = row.id
this.formData.recordType = row.clickType this.formData.recordType = row.clickType
await this.listProject(row.id) await this.listProject(row.id)
@ -103,6 +112,9 @@ export default {
this.formData.ticketsWorkStatus = "02" this.formData.ticketsWorkStatus = "02"
this.formData.item.itemStatus = "02" this.formData.item.itemStatus = "02"
this.projectList = this.projectList.filter(item => item.itemStatus === '02') this.projectList = this.projectList.filter(item => item.itemStatus === '02')
}else {
this.isNext = this.projectList.filter(item => item.itemStatus !== '03').length > 0
this.projectList = this.projectList.filter(item => item.itemStatus === '02')
} }
}finally { }finally {
this.formLoading = false this.formLoading = false
@ -111,7 +123,7 @@ export default {
async doUpdate(){ async doUpdate(){
try { try {
await this.$refs.formRef.validate() await this.$refs.formRef.validate()
this.formData.image = this.formData.image.map(item => item.url).join(",") // this.formData.image = this.formData.image.map(item => item.url).join(",")
this.formLoading = true this.formLoading = true
await updateStatus(this.formData) await updateStatus(this.formData)
this.$modal.msgSuccess("操作成功") this.$modal.msgSuccess("操作成功")