代码优化
This commit is contained in:
parent
6329fc3251
commit
2bc06371e6
|
|
@ -52,7 +52,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工机具类型" prop="typeId">
|
<el-form-item label="工机具类型" prop="typeId">
|
||||||
<el-cascader
|
<!-- <el-cascader
|
||||||
v-model="queryParams.typeId"
|
v-model="queryParams.typeId"
|
||||||
:options="deptOptions"
|
:options="deptOptions"
|
||||||
:props="{
|
:props="{
|
||||||
|
|
@ -64,7 +64,13 @@
|
||||||
@change="handleNodeClick"
|
@change="handleNodeClick"
|
||||||
aria-placeholder="请选择极具类型"
|
aria-placeholder="请选择极具类型"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
></el-cascader>
|
></el-cascader> -->
|
||||||
|
<Tree
|
||||||
|
ref="mychildSon"
|
||||||
|
:width="240"
|
||||||
|
:dataList="deptList"
|
||||||
|
@changeId="selectDrop"
|
||||||
|
></Tree>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="退料申请时间" prop="time">
|
<el-form-item label="退料申请时间" prop="time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -599,17 +605,20 @@ import {
|
||||||
// getUseNumByTypeId
|
// getUseNumByTypeId
|
||||||
} from '@/api/claimAndRefund/receive.js'
|
} from '@/api/claimAndRefund/receive.js'
|
||||||
import dialogFormByCq from '@/views/claimAndRefund/return/dialogFormByCq.vue'
|
import dialogFormByCq from '@/views/claimAndRefund/return/dialogFormByCq.vue'
|
||||||
|
import { listPartTypeApi } from '@/api/repairTest/repair'
|
||||||
|
import Tree from '@/views/claimAndRefund/return/tree.vue'
|
||||||
// 10:42开始日期startTime,结束日期endTime 机具类型typeId
|
// 10:42开始日期startTime,结束日期endTime 机具类型typeId
|
||||||
// http://localhost/claimAndRefund/return/returnApply
|
// http://localhost/claimAndRefund/return/returnApply
|
||||||
export default {
|
export default {
|
||||||
name: '',
|
name: '',
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
components: { dialogFormByCq },
|
components: { dialogFormByCq, Tree },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fullscreenLoading: false,
|
fullscreenLoading: false,
|
||||||
type: '',
|
type: '',
|
||||||
isShowOneFlag: false,
|
isShowOneFlag: false,
|
||||||
|
deptList: [],
|
||||||
priKey: '',
|
priKey: '',
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
|
|
@ -710,11 +719,15 @@ export default {
|
||||||
// this.getList();
|
// this.getList();
|
||||||
this.initSelectData()
|
this.initSelectData()
|
||||||
this.InitIGetInfo()
|
this.InitIGetInfo()
|
||||||
|
this.getTree()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// claimAndRefund/return/returnApplyAdd
|
// claimAndRefund/return/returnApplyAdd
|
||||||
// claimAndRefund/return/returnApplyAdd
|
// claimAndRefund/return/returnApplyAdd
|
||||||
/** 查询字典类型列表 startTime,结束日期endTime */
|
/** 查询字典类型列表 startTime,结束日期endTime */
|
||||||
|
selectDrop(value) {
|
||||||
|
this.queryParams.typeId = value
|
||||||
|
},
|
||||||
async getList() {
|
async getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
||||||
|
|
@ -757,6 +770,8 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = []
|
this.queryParams.time = []
|
||||||
|
this.queryParams.typeId = ''
|
||||||
|
this.$refs.mychildSon.inputValue = ''
|
||||||
// this.resetForm("queryForm");
|
// this.resetForm("queryForm");
|
||||||
this.$refs.queryForm.resetFields()
|
this.$refs.queryForm.resetFields()
|
||||||
this.initSelectData()
|
this.initSelectData()
|
||||||
|
|
@ -782,7 +797,15 @@ export default {
|
||||||
// isEdit: true,
|
// 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() {
|
handleUpdateOrder() {
|
||||||
|
|
|
||||||
|
|
@ -492,9 +492,16 @@ export default {
|
||||||
break
|
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, 'createTime', null)
|
||||||
this.$set(row, 'productionTime', '')
|
this.$set(row, 'productionTime', '')
|
||||||
this.$set(row, 'supplierId', '')
|
// this.$set(row, 'supplierId', '')
|
||||||
this.$set(row, 'purchasePrice', 0)
|
this.$set(row, 'purchasePrice', 0)
|
||||||
this.$set(row, 'purchaseNum', 1)
|
this.$set(row, 'purchaseNum', 1)
|
||||||
this.equipmentList.unshift(row)
|
this.equipmentList.unshift(row)
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,6 @@
|
||||||
filterable
|
filterable
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@change="changeSupplier"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supplierList"
|
v-for="item in supplierList"
|
||||||
|
|
@ -655,11 +654,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//选择机具厂家
|
//选择机具厂家
|
||||||
changeSupplier(supplierId) {
|
// changeSupplier(supplierId) {
|
||||||
this.equipmentList.forEach((item) => {
|
// this.equipmentList.forEach((item) => {
|
||||||
this.$set(item, 'supplierId', supplierId)
|
// this.$set(item, 'supplierId', supplierId)
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleSave() {
|
handleSave() {
|
||||||
if (this.equipmentList.length > 0) {
|
if (this.equipmentList.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@change="changeSupplier"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supplierList"
|
v-for="item in supplierList"
|
||||||
|
|
@ -463,20 +462,27 @@ export default {
|
||||||
break
|
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, 'createTime', null)
|
||||||
this.$set(row, 'productionTime', '')
|
this.$set(row, 'productionTime', '')
|
||||||
this.$set(row, 'supplierId', '')
|
// this.$set(row, 'supplierId', '')
|
||||||
this.$set(row, 'purchasePrice', 0)
|
this.$set(row, 'purchasePrice', 0)
|
||||||
this.$set(row, 'purchaseNum', 1)
|
this.$set(row, 'purchaseNum', 1)
|
||||||
this.equipmentList.unshift(row)
|
this.equipmentList.unshift(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//选择机具厂家
|
//选择机具厂家
|
||||||
changeSupplier(supplierId) {
|
// changeSupplier(supplierId) {
|
||||||
this.equipmentList.forEach((item) => {
|
// this.equipmentList.forEach((item) => {
|
||||||
this.$set(item, 'supplierId', supplierId)
|
// this.$set(item, 'supplierId', supplierId)
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
//选择出厂日期
|
//选择出厂日期
|
||||||
changeTime(time) {
|
changeTime(time) {
|
||||||
console.log(time)
|
console.log(time)
|
||||||
|
|
|
||||||
|
|
@ -42,12 +42,12 @@ module.exports = {
|
||||||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||||
// target: `https://z.csgmall.com.cn`,
|
// 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://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://10.40.92.138:28080`, //帅
|
||||||
// target: `http://192.168.2.218:39080`, //福
|
// 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;
|
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;
|
||||||
|
|
|
||||||
Reference in New Issue