From f99df38248ed1977a3686c582be2fc4f69fc1d8f Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Tue, 24 Dec 2024 14:30:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E9=A9=B3=E5=9B=9E=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E6=93=8D=E4=BD=9C=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../goodsArrived/component/addTools.vue | 79 ++++++++++---------
1 file changed, 43 insertions(+), 36 deletions(-)
diff --git a/src/views/material/purchase/goodsArrived/component/addTools.vue b/src/views/material/purchase/goodsArrived/component/addTools.vue
index 556482f4..2368db03 100644
--- a/src/views/material/purchase/goodsArrived/component/addTools.vue
+++ b/src/views/material/purchase/goodsArrived/component/addTools.vue
@@ -51,7 +51,6 @@
clearable
maxlength="50"
style="width: 240px"
- @keyup.enter.native="handleQuery"
@input="taxRateChange"
/>
%
@@ -125,7 +124,7 @@
(scope.row.unitValue==1?scope.row.purchaseNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.purchaseNum=Number(v.replace(/[^\d]/g,'')))"
>
@@ -140,7 +139,7 @@
v-model="scope.row.purchaseTaxPrice"
controls-position="right"
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)"
>
@@ -155,7 +154,7 @@
v-model="scope.row.purchasePrice"
controls-position="right"
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)"
>
@@ -170,7 +169,7 @@
@@ -190,7 +189,7 @@
v-model="scope.row.productionTime"
style="width: 100%"
value-format="yyyy-MM-dd"
- type="date"
+ type="date" :disabled="scope.row.status!=1&&scope.row.status!=12"
placeholder="出厂日期"
clearable
>
@@ -222,7 +221,7 @@
{
- 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.forEach((item4) => {
- item4.maTypeName =
- item3.typeName
- item4.specificationType =
- item4.typeName
+ item4.maTypeName = item3.typeName
+ item4.specificationType = item4.typeName
this.$set(item4, 'purchaseTaxPrice', 0)
this.$set(item4, 'purchasePrice', 0)
})
@@ -504,14 +503,36 @@ export default {
})
//反显
let selectList = []
- this.equipmentList.forEach((e) => {
- selectList.push(
- this.getParentsById(this.equipmentTypeList, e.typeId),
- )
+ console.log(this.equipmentList)
+ this.equipmentList.forEach((e) => {
+ console.log(this.equipmentList)
+ selectList.push(this.getParentsById(this.equipmentTypeList, e.typeId, e.status))
})
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) {
const deviceTypeList =
@@ -564,13 +585,15 @@ export default {
//选择出厂日期
productionTimeChange(val){
this.equipmentList.forEach(item=>{
- item.productionTime=val
+ if(item.status==1||item.status==12){
+ item.productionTime=val
+ }
})
},
//获取任务详情--- 编辑回显数据
- getTaskInfo() {
+ async getTaskInfo() {
// 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.id = response.data.purchaseCheckInfo.id
this.maForm.taskId = response.data.purchaseCheckInfo.taskId
@@ -757,23 +780,7 @@ export default {
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) {
// console.log(row.id)