新购驳回编辑操作修改
This commit is contained in:
parent
4cb92fe78b
commit
f99df38248
|
|
@ -51,7 +51,6 @@
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
@input="taxRateChange"
|
@input="taxRateChange"
|
||||||
/>
|
/>
|
||||||
<span>%</span>
|
<span>%</span>
|
||||||
|
|
@ -125,7 +124,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="scope.row.purchaseNum"
|
v-model.number="scope.row.purchaseNum"
|
||||||
controls-position="right" type="number"
|
controls-position="right" type="number"
|
||||||
style="width: 100%"
|
style="width: 100%" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||||
:min="0" @input="(v)=>(scope.row.unitValue==1?scope.row.purchaseNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.purchaseNum=Number(v.replace(/[^\d]/g,'')))"
|
:min="0" @input="(v)=>(scope.row.unitValue==1?scope.row.purchaseNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.purchaseNum=Number(v.replace(/[^\d]/g,'')))"
|
||||||
></el-input>
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -140,7 +139,7 @@
|
||||||
v-model="scope.row.purchaseTaxPrice"
|
v-model="scope.row.purchaseTaxPrice"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:min="0" :step="1"
|
:min="0" :step="1" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||||
@change="purchaseTaxPriceChange(scope.row,scope.$index)"
|
@change="purchaseTaxPriceChange(scope.row,scope.$index)"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -155,7 +154,7 @@
|
||||||
v-model="scope.row.purchasePrice"
|
v-model="scope.row.purchasePrice"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:min="0" :step="1"
|
:min="0" :step="1" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||||
@input="purchasePriceChange(scope.row,scope.$index)"
|
@input="purchasePriceChange(scope.row,scope.$index)"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -170,7 +169,7 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.fixCode"
|
v-model="scope.row.fixCode"
|
||||||
placeholder="固定资产"
|
placeholder="固定资产"
|
||||||
filterable
|
filterable :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option label="是" value="1"></el-option>
|
<el-option label="是" value="1"></el-option>
|
||||||
|
|
@ -190,7 +189,7 @@
|
||||||
v-model="scope.row.productionTime"
|
v-model="scope.row.productionTime"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||||
placeholder="出厂日期"
|
placeholder="出厂日期"
|
||||||
clearable
|
clearable
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
|
|
@ -222,7 +221,7 @@
|
||||||
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text" v-if="scope.row.status==1||scope.row.status==12"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
style="color: red"
|
style="color: red"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
|
@ -447,7 +446,9 @@ export default {
|
||||||
taxRateChange(val){
|
taxRateChange(val){
|
||||||
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
|
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
|
||||||
this.equipmentList.forEach(item=>{
|
this.equipmentList.forEach(item=>{
|
||||||
item.purchaseTaxPrice = ((item.purchasePrice*(1 + val))/100).toFixed(10)
|
if(item.status==1||item.status==12){
|
||||||
|
item.purchaseTaxPrice = ((item.purchasePrice*(1 + this.maForm.taxRate/100))).toFixed(10)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 含税单价
|
// 含税单价
|
||||||
|
|
@ -489,10 +490,8 @@ export default {
|
||||||
item3.children.length > 0
|
item3.children.length > 0
|
||||||
) {
|
) {
|
||||||
item3.children.forEach((item4) => {
|
item3.children.forEach((item4) => {
|
||||||
item4.maTypeName =
|
item4.maTypeName = item3.typeName
|
||||||
item3.typeName
|
item4.specificationType = item4.typeName
|
||||||
item4.specificationType =
|
|
||||||
item4.typeName
|
|
||||||
this.$set(item4, 'purchaseTaxPrice', 0)
|
this.$set(item4, 'purchaseTaxPrice', 0)
|
||||||
this.$set(item4, 'purchasePrice', 0)
|
this.$set(item4, 'purchasePrice', 0)
|
||||||
})
|
})
|
||||||
|
|
@ -504,14 +503,36 @@ export default {
|
||||||
})
|
})
|
||||||
//反显
|
//反显
|
||||||
let selectList = []
|
let selectList = []
|
||||||
|
console.log(this.equipmentList)
|
||||||
this.equipmentList.forEach((e) => {
|
this.equipmentList.forEach((e) => {
|
||||||
selectList.push(
|
console.log(this.equipmentList)
|
||||||
this.getParentsById(this.equipmentTypeList, e.typeId),
|
selectList.push(this.getParentsById(this.equipmentTypeList, e.typeId, e.status))
|
||||||
)
|
|
||||||
})
|
})
|
||||||
this.deviceType = selectList
|
this.deviceType = selectList
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//树结构数据获取父
|
||||||
|
getParentsById(list, id, status) {
|
||||||
|
for (let i in list) {
|
||||||
|
if (list[i].typeId == id) {
|
||||||
|
console.log(id)
|
||||||
|
console.log(status)
|
||||||
|
if(status!=1&&status!=12){
|
||||||
|
list[i].disabled=true
|
||||||
|
}
|
||||||
|
//查询到就返回该数组对象的value
|
||||||
|
return [list[i].typeId]
|
||||||
|
}
|
||||||
|
if (list[i].children) {
|
||||||
|
let node = this.getParentsById(list[i].children, id, status)
|
||||||
|
if (node !== undefined) {
|
||||||
|
//查询到把父节把父节点加到数组前面
|
||||||
|
node.unshift(list[i].typeId)
|
||||||
|
return node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
//添加机具类型
|
//添加机具类型
|
||||||
deviceTypeChange(val) {
|
deviceTypeChange(val) {
|
||||||
const deviceTypeList =
|
const deviceTypeList =
|
||||||
|
|
@ -564,13 +585,15 @@ export default {
|
||||||
//选择出厂日期
|
//选择出厂日期
|
||||||
productionTimeChange(val){
|
productionTimeChange(val){
|
||||||
this.equipmentList.forEach(item=>{
|
this.equipmentList.forEach(item=>{
|
||||||
|
if(item.status==1||item.status==12){
|
||||||
item.productionTime=val
|
item.productionTime=val
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取任务详情--- 编辑回显数据
|
//获取任务详情--- 编辑回显数据
|
||||||
getTaskInfo() {
|
async getTaskInfo() {
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
getPurchaseCheckInfo({taskId:this.taskId,id:this.id,statusList:[1]}).then((response) => {
|
await getPurchaseCheckInfo({taskId:this.taskId,id:this.id,statusList:[1]}).then((response) => {
|
||||||
this.maForm = response.data.purchaseCheckInfo
|
this.maForm = response.data.purchaseCheckInfo
|
||||||
this.maForm.id = response.data.purchaseCheckInfo.id
|
this.maForm.id = response.data.purchaseCheckInfo.id
|
||||||
this.maForm.taskId = response.data.purchaseCheckInfo.taskId
|
this.maForm.taskId = response.data.purchaseCheckInfo.taskId
|
||||||
|
|
@ -757,23 +780,7 @@ export default {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//树结构数据获取父
|
|
||||||
getParentsById(list, id) {
|
|
||||||
for (let i in list) {
|
|
||||||
if (list[i].typeId == id) {
|
|
||||||
//查询到就返回该数组对象的value
|
|
||||||
return [list[i].typeId]
|
|
||||||
}
|
|
||||||
if (list[i].children) {
|
|
||||||
let node = this.getParentsById(list[i].children, id)
|
|
||||||
if (node !== undefined) {
|
|
||||||
//查询到把父节把父节点加到数组前面
|
|
||||||
node.unshift(list[i].typeId)
|
|
||||||
return node
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
// console.log(row.id)
|
// console.log(row.id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue