@@ -632,11 +639,13 @@ import { hasPermission } from '@/utils/limits.js'
export default {
components: { AddConsTakin, UploadExcel, consRecordDetail },
- name:'information',
+ name: 'information',
data() {
return {
tongji: {},//统计
dayjs,
+ // 切换主副单位
+ switchzhufu: "1",
query: {
conTypeId: "",
conTypeName: "",
@@ -710,7 +719,7 @@ export default {
},
ruleFormLoading: false,
dialogtitleunit: false,
- unitItem: { switchs: 2 },
+ unitItem: {},
switchs: 2,
ruleForms: [],
ruleForm: {
@@ -764,6 +773,11 @@ export default {
this.getTableDatatype();
},
methods: {
+ deleteEvent() {
+ this.switchs = 2
+ this.unitItem.conUnitTwo = ''
+ this.unitItem.conUnitTwoConvert = ''
+ },
async routerGo(name) {
let text;
if (name == 'operation_in') { text = "允许耗材入库" }
@@ -771,6 +785,9 @@ export default {
let res = await hasPermission(text);
if (!res) { return; }
this.$router.push({ name: name })
+ },
+ closeande() {
+
},
lookDetail(row) {
this.$refs.recodeDetail.open({
@@ -805,13 +822,20 @@ export default {
})
},
async submitUnit() {
+
+ console.log(this.switchzhufu, '体哦啊是1')
+
const res = await unittbConsInfo([{
+ defaultUnit: this.switchzhufu == 1 ? this.unitItem.conUnit : this.unitItem.conUnitTwo,
conUnitTwoConvert: this.unitItem.conUnitTwoConvert * 1,
conUnitTwo: this.unitItem.conUnitTwo,
id: this.unitItem.id
}])
this.unitItem = {}
this.dialogtitleunit = false
+ this.resetRuleForms()
+ this.getTableData();
+ this.getTableDatatype();
},
//跳转订单列表
toGoodslist(orderNo) {
@@ -866,6 +890,10 @@ export default {
return 'red'
}
},
+ conUnitTwoinput(d) {
+ // console.log(d.target.value,'调试1')
+ this.unitItem.conUnitTwo = d.target.value
+ },
// 状态切换
async showChange(e, row) {
await postapitbConsInfo([{
@@ -889,11 +917,19 @@ export default {
},
// 单位编辑
editorHandles(row) {
- this.unitItem = row;
- this.switchs = 2
- if (row.conUnitTwo) {
- this.switchs = 1
- }
+ // this.unitItem = row;
+ this.unitItem.conUnitTwoConvert = row.conUnitTwoConvert
+ this.unitItem.id = row.id
+ this.unitItem.conUnit = row.conUnit
+ this.unitItem.conName = row.conName
+ this.unitItem.conUnitTwo = row.conUnitTwo
+ if (row.conUnitTwo) this.switchs = 1
+ else this.switchs = 2
+
+ // this.switchs = 2
+ // if (row. ) {
+ // this.switchs = 1
+ // }
this.dialogtitleunit = true;
},
@@ -1396,7 +1432,7 @@ export default {
color: #999999;
>input {
- width: 39px;
+ width: 75px;
height: 28px;
background: #FFFFFF;
border-radius: 2px 2px 2px 2px;
diff --git a/src/views/invoicing/operation_in.vue b/src/views/invoicing/operation_in.vue
index 5c53a01..416b867 100644
--- a/src/views/invoicing/operation_in.vue
+++ b/src/views/invoicing/operation_in.vue
@@ -43,6 +43,7 @@
+ {{ queryForm.waitAmount }}
@@ -84,10 +85,6 @@
-
-
-
-
@@ -123,13 +120,27 @@
- 原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}
+ 原价¥
+
+
+ {{ !scope.row.unit ?
+ (scope.row.defaultUnit ?
+ scope.row.defaultUnit== scope.row.conUnitTwo?
+ ((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice:scope.row.costPrice)
+ : scope.row.unit== scope.row.conUnitTwo?
+ ((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice}}
+ /
+ {{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
+ scope.row.conUnit) : scope.row.unit }}
+
+
+
+ :placeholder="scope.row.defaultUnit ? scope.row.defaultUnit : scope.row.conUnit">
@@ -142,7 +153,16 @@
- 入库前:{{ scope.row.number }}{{ scope.row.conUnit }}
+
入库前:
+ {{ !scope.row.unit ?
+ (scope.row.defaultUnit ?
+ scope.row.defaultUnit== scope.row.conUnitTwo?
+ (scope.row.number/scope.row.conUnitTwoConvert): scope.row.number:scope.row.number)
+ : scope.row.unit== scope.row.conUnitTwo?
+ (scope.row.number/scope.row.conUnitTwoConvert): scope.row.number}}
+
+ {{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
+ scope.row.conUnit) : scope.row.unit }}
@@ -188,7 +208,8 @@
-
入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}
+
入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName
+ }}
@@ -240,7 +261,7 @@ import { tbConsInfoGet, tbProductlist } from "@/api/invoicing";
import { tbShopPurveyorGet, tbProductStockOperateOutAndOn, stockInOut } from '@/api/invoicing'
import { formatDecimal } from '@/utils'
export default {
- name:'operation_in',
+ name: 'operation_in',
components: {
shopList,
ConsumableList
@@ -380,7 +401,11 @@ export default {
})
} else {
this.tableData.list.forEach(ele => {
- zong += ele.price * ele.stockNumber
+ let p = 1
+ if (ele.unit && ele.conUnitTwo == ele.unit) {
+ p = ele.conUnitTwoConvert
+ }
+ zong += ele.price * ele.stockNumber * p
})
}
this.queryForm.totalAmount = formatDecimal(zong)
@@ -404,7 +429,6 @@ export default {
},
// 切换入库内容
tabChange(value, type) {
- console.log(value, type)
this.shopTypesActive = type == 'in' ? 0 : 1
this.inTabValue = value
this.resetHandle()
@@ -413,7 +437,7 @@ export default {
},
// 切换类型
changeTypeEnum(index) {
- let filterd= this.purveyorList.filter(ele=>ele.id == index)
+ let filterd = this.purveyorList.filter(ele => ele.id == index)
this.queryForm.waitAmount = filterd[0].waitAmount
this.inTabs.forEach((i) => {
@@ -445,7 +469,6 @@ export default {
}, 10)
} else {
row[key1] = cvalue
-
let zong = 0
this.tableData.list.forEach(ele => {
let p = 1
diff --git a/src/views/invoicing/operation_out.vue b/src/views/invoicing/operation_out.vue
index 3096136..29de460 100644
--- a/src/views/invoicing/operation_out.vue
+++ b/src/views/invoicing/operation_out.vue
@@ -43,6 +43,7 @@
+ {{ queryForm.waitAmount }}
@@ -83,11 +84,6 @@
-
-
-
-
-
@@ -122,18 +118,32 @@
- 原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}
+ 原价¥
+
+ {{ !scope.row.unit ?
+ (scope.row.defaultUnit ?
+ scope.row.defaultUnit== scope.row.conUnitTwo?
+ ((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice:scope.row.costPrice)
+ : scope.row.unit== scope.row.conUnitTwo?
+ ((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice}}
+ /
+ {{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
+ scope.row.conUnit) : scope.row.unit }}
+
+
+ :placeholder="scope.row.defaultUnit ? scope.row.defaultUnit : scope.row.conUnit">
+
+
@@ -141,7 +151,21 @@
- 出库前:{{ scope.row.number }}{{ scope.row.conUnit }}
+
+
+ 出库前:
+ {{ !scope.row.unit ?
+ (scope.row.defaultUnit ?
+ scope.row.defaultUnit== scope.row.conUnitTwo?
+ (scope.row.number/scope.row.conUnitTwoConvert): scope.row.number:scope.row.number)
+ : scope.row.unit== scope.row.conUnitTwo?
+ (scope.row.number/scope.row.conUnitTwoConvert): scope.row.number}}
+
+ {{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
+ scope.row.conUnit) : scope.row.unit }}
+
+
+
@@ -184,7 +208,7 @@
- 出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}
+ 出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}
@@ -385,7 +409,11 @@ export default {
})
} else {
this.tableData.list.forEach(ele => {
- zong += ele.price * ele.stockNumber
+ let p = 1
+ if (ele.unit && ele.conUnitTwo == ele.unit) {
+ p = ele.conUnitTwoConvert
+ }
+ zong += ele.price * ele.stockNumber * p
})
}
this.queryForm.totalAmount = formatDecimal(zong)
diff --git a/src/views/order_manage/order_list.vue b/src/views/order_manage/order_list.vue
index bb5d714..aa6bdd8 100644
--- a/src/views/order_manage/order_list.vue
+++ b/src/views/order_manage/order_list.vue
@@ -234,6 +234,10 @@ export default {
if (this.$route.query.tableName) {
this.query.tableName = this.$route.query.tableName
}
+ if (this.$route.query.timeValue) {
+ this.timeValue = this.$route.query.timeValue
+ this.timeChange(this.timeValue);
+ }
if (this.$route.query.orderNo) {
this.query.orderNo = this.$route.query.orderNo
}
diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue
index e219e29..e11e399 100644
--- a/src/views/tool/Instead/index.vue
+++ b/src/views/tool/Instead/index.vue
@@ -825,7 +825,7 @@