代码优化

This commit is contained in:
BianLzhaoMin 2024-08-27 15:54:36 +08:00
parent 6329fc3251
commit 2bc06371e6
5 changed files with 56 additions and 21 deletions

View File

@ -52,7 +52,7 @@
</el-select>
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<el-cascader
<!-- <el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
@ -64,7 +64,13 @@
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
style="width: 240px"
></el-cascader>
></el-cascader> -->
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-form-item label="退料申请时间" prop="time">
<el-date-picker
@ -599,17 +605,20 @@ import {
// getUseNumByTypeId
} from '@/api/claimAndRefund/receive.js'
import dialogFormByCq from '@/views/claimAndRefund/return/dialogFormByCq.vue'
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from '@/views/claimAndRefund/return/tree.vue'
// 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply
export default {
name: '',
dicts: ['sys_normal_disable'],
components: { dialogFormByCq },
components: { dialogFormByCq, Tree },
data() {
return {
fullscreenLoading: false,
type: '',
isShowOneFlag: false,
deptList: [],
priKey: '',
//
loading: true,
@ -710,11 +719,15 @@ export default {
// this.getList();
this.initSelectData()
this.InitIGetInfo()
this.getTree()
},
methods: {
// claimAndRefund/return/returnApplyAdd
// claimAndRefund/return/returnApplyAdd
/** 查询字典类型列表 startTime,结束日期endTime */
selectDrop(value) {
this.queryParams.typeId = value
},
async getList() {
this.loading = true
if (this.queryParams.time && this.queryParams.time.length > 0) {
@ -757,6 +770,8 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.queryParams.time = []
this.queryParams.typeId = ''
this.$refs.mychildSon.inputValue = ''
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.initSelectData()
@ -782,7 +797,15 @@ export default {
// isEdit: true,
// },
// })
this.$emit('rejectSubmit', { id: row.id, agreementId: row.agreementId })
this.$emit('rejectSubmit', {
id: row.id,
agreementId: row.agreementId,
})
},
getTree() {
listPartTypeApi().then((response) => {
this.deptList = response.data
})
},
// 退
handleUpdateOrder() {

View File

@ -492,9 +492,16 @@ export default {
break
}
}
//
if (this.queryParams.supplierId) {
this.$set(row, 'supplierId', this.queryParams.supplierId)
} else {
this.$set(row, 'supplierId', '')
}
this.$set(row, 'createTime', null)
this.$set(row, 'productionTime', '')
this.$set(row, 'supplierId', '')
// this.$set(row, 'supplierId', '')
this.$set(row, 'purchasePrice', 0)
this.$set(row, 'purchaseNum', 1)
this.equipmentList.unshift(row)

View File

@ -87,7 +87,6 @@
filterable
:disabled="isDisabled"
style="width: 240px"
@change="changeSupplier"
>
<el-option
v-for="item in supplierList"
@ -655,11 +654,11 @@ export default {
}
},
//
changeSupplier(supplierId) {
this.equipmentList.forEach((item) => {
this.$set(item, 'supplierId', supplierId)
})
},
// changeSupplier(supplierId) {
// this.equipmentList.forEach((item) => {
// this.$set(item, 'supplierId', supplierId)
// })
// },
/** 新增按钮操作 */
handleSave() {
if (this.equipmentList.length > 0) {

View File

@ -41,7 +41,6 @@
clearable
filterable
style="width: 240px"
@change="changeSupplier"
>
<el-option
v-for="item in supplierList"
@ -463,20 +462,27 @@ export default {
break
}
}
//
if (this.queryParams.supplierId) {
this.$set(row, 'supplierId', this.queryParams.supplierId)
} else {
this.$set(row, 'supplierId', '')
}
this.$set(row, 'createTime', null)
this.$set(row, 'productionTime', '')
this.$set(row, 'supplierId', '')
// this.$set(row, 'supplierId', '')
this.$set(row, 'purchasePrice', 0)
this.$set(row, 'purchaseNum', 1)
this.equipmentList.unshift(row)
}
},
//
changeSupplier(supplierId) {
this.equipmentList.forEach((item) => {
this.$set(item, 'supplierId', supplierId)
})
},
// changeSupplier(supplierId) {
// this.equipmentList.forEach((item) => {
// this.$set(item, 'supplierId', supplierId)
// })
// },
//
changeTime(time) {
console.log(time)

View File

@ -42,12 +42,12 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
// target: `http://192.168.2.141:39080`, //超
target: `http://192.168.2.152:39080`, //超
// target: `http://10.40.92.81:8080`, //韩/
target: `http://192.168.2.81:39080`,//旭/
// target: `http://192.168.2.81:39080`,//旭/
// target: `http://10.40.92.138:28080`, //帅
// target: `http://192.168.2.218:39080`, //福
// target: `http://192.168.2.120:39080`, //跃o
// target: `http://192.168.2.120:39080`, //跃
//******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;