From 086a3b43444d881ccb4faaf4a7eb6995140dd6a6 Mon Sep 17 00:00:00 2001
From: fengdong777 <1478994744@qq.com>
Date: Tue, 30 May 2023 18:03:37 +0800
Subject: [PATCH] 5.30
---
.../yxt-supervise-cyf-ui/.env.development | 2 +-
.../src/api/baseInfo/becomeoil/index.js | 38 ++
.../yxt-supervise-cyf-ui/src/router/index.js | 2 +-
.../views/baseInfo/becomeoil/commodity.vue | 125 +++++-
.../src/views/baseInfo/becomeoil/index.vue | 125 +++---
.../views/baseInfo/commodityBrand/index.vue | 6 +-
.../baseInfo/commodityFily/commodity.vue | 18 +-
.../views/baseInfo/commodityFily/index.vue | 10 +-
.../src/views/inventory/oilBecome/index.vue | 9 +-
.../src/views/supervise/becomeOil/index.vue | 390 +++++++++++-------
10 files changed, 473 insertions(+), 252 deletions(-)
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development b/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
index 42dcdbae..e8af3e83 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
@@ -6,7 +6,7 @@ VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
## VUE_APP_URL = "http://cg9jzr.natappfree.cc"
- VUE_APP_URL = "http://192.168.1.193:7101"
+ VUE_APP_URL = "http://192.168.1.177:7101"
## VUE_APP_URL = "http://192.168.1.193:7101"
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/becomeoil/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/becomeoil/index.js
index 0aa26aea..a19b61a1 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/becomeoil/index.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/becomeoil/index.js
@@ -57,4 +57,42 @@ export default {
}
})
},
+ //添加成品油库存
+ invenRecordSave: function(params) {
+ return request({
+ url: '/cyf/invenRecord/save',
+ method: 'post',
+ data: params,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'token': tokens
+ }
+ })
+ },
+ //修改商品类别单价
+ inventoryUpdate: function(params) {
+ return request({
+ url: '/cyf/inventory/update',
+ method: 'post',
+ data: params,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'token': tokens
+ }
+ })
+ },
+ // 查询品牌下商品的
+ selectInformationType: function(sid) {
+ return request({
+ url: '/cyf/productInfo/selectInformationType/' + sid,
+ method: 'get'
+ })
+},
+ // 查询商品下各个类别的
+ selectProductType: function(sid) {
+ return request({
+ url: '/cyf/productType/selectProductType/' + sid,
+ method: 'get'
+ })
+},
}
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
index d1477ae6..2e55ac36 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
@@ -146,7 +146,7 @@ export const constantRoutes = [{
import('@/views/baseInfo/becomeoil/index.vue'),
name: 'index',
meta: {
- title: '商品类别'
+ title: '商品油库存'
}
},
]
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/commodity.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/commodity.vue
index 5f85c0db..121311fb 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/commodity.vue
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/commodity.vue
@@ -14,23 +14,46 @@
+
+ 品牌名称:
+
+
+
+
+
+ 品牌编码:
+
+
+
商品名称:
-
-
+
+
- 数量:
-
+ 商品编码:
+
+
+
+
+ 商品类别:
+
+
+
+
+
+ 类别编码:
+
+
- 编号:
-
+ 数量:
+
单价(元):
-
+
@@ -45,15 +68,27 @@
data() {
return {
submitdisabled: false,
+ prodLists: [],
+ prodList: [],
crudeLists: [],
crudeList: [],
- sidlist:[],
+ ListLists: [],
+ ListList: [],
formobj: {
amount: "",
- number: "",
price:'',
prodSid:'',
+ prodNumber:'',
+ crudeNumber:'',
+ crudeSid:'',
+ ListNumber:'',
+ ListSid:'',
},
+ form:{
+ amount:'',
+ price:'',
+ prodSid:'',
+ }
}
},
created() {
@@ -61,7 +96,7 @@
},
methods: {
saveOrUpdate() {
- req.save(this.formobj)
+ req.save(this.form)
.then(resp => {
if (resp.success) {
this.$message({
@@ -79,12 +114,49 @@
},
last(){
req.selectList().then((response) => {
- this.listLoading = false
if (response.success) {
- this.sidlist = response.data
- } else {
- this.sidlist = []
- }
+ this.prodLists = response.data
+ for (var i = 0; i < this.prodLists.length; i++) {
+
+ let item = {
+ name: this.prodLists[i].name,
+ sid: this.prodLists[i].sid,
+
+ }
+ this.prodList.push(item)
+ }}
+ })
+ },
+ lastList(value){
+ req.selectInformationType(value).then((response) => {
+ if (response.success) {
+ this.crudeLists = response.data
+ this.crudeList = []
+ this.ListList = []
+ for (var i = 0; i < this.crudeLists.length; i++) {
+ let item = {
+ name: this.crudeLists[i].name,
+ sid: this.crudeLists[i].sid,
+
+ }
+ this.crudeList.push(item)
+ }}
+ })
+ },
+ handleList(value){
+ req.selectProductType(value).then((response) => {
+ if (response.success) {
+ this.ListLists = response.data
+ this.ListList = []
+ for (var i = 0; i < this.ListLists.length; i++) {
+
+ let item = {
+ name: this.ListLists[i].name,
+ sid: this.ListLists[i].sid,
+
+ }
+ this.ListList.push(item)
+ }}
})
},
handleReturn(isreload) {
@@ -95,6 +167,29 @@
}
this.$emit('doback')
},
+ getType(value) {
+ const choose = this.prodLists.filter((item) => item.sid === value)
+ this.formobj.prodNumber = choose[0].number
+ this.formobj.crudeSid=''
+ this.formobj.crudeNumber=''
+ this.formobj.ListSid=''
+ this.formobj.ListNumber=''
+
+ this.lastList(value)
+ },
+ getTank(value) {
+ const choose = this.crudeLists.filter((item) => item.sid === value)
+ this.formobj.crudeNumber = choose[0].number
+ this.formobj.ListSid=''
+ this.formobj.ListNumber=''
+
+ this.handleList(value)
+ },
+ getList(value) {
+ const choose = this.ListLists.filter((item) => item.sid === value)
+ this.formobj.ListNumber = choose[0].number
+ this.form.prodSid = value
+ },
}
}
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/index.vue
index 94414469..3d54af7a 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/index.vue
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/index.vue
@@ -2,7 +2,7 @@
+
+
+
+ 商品类别名称 |
+
+
+ |
+
+
+ 单价 |
+
+
+ |
+
+
+
+ 保存
+
+
-
-
-
-
- 类型名称 |
-
-
- |
-
-
- 类型编号 |
-
-
- |
-
-
-
- 保存
-
-
@@ -147,9 +149,9 @@ export default {
btndisabled: false,
editDialog: false,
form: {
- name: "",
- number: "",
+ price: "",
sid: "",
+ typeName:'',
},
btnList: [
{
@@ -253,34 +255,33 @@ export default {
};
this.getList();
},
+ purchase(row) {
+ this.editDialog = true;
+ this.form = Object.assign({}, row);
+ this.form.sid = row.sid
+ },
+ save() {
+ req.inventoryUpdate(this.form)
+ .then(resp => {
+ if (resp.success) {
+ this.$message({
+ showClose: true,
+ type: 'success',
+ message: resp.msg
+ })
+ this.editDialog = false;
+ this.getList()
+ } else {
+ // 根据resp.code进行异常情况处理
+ }
+ })
+ .catch(() => {})
+ this.reset();
+ },
// 打开添加
toAdd() {
this.viewState = 2;
},
- purchase(row) {
- this.editDialog = true;
- this.form = Object.assign({}, row);
- this.form.sid = row.sid;
- },
- save() {
- req
- .update(this.form)
- .then((resp) => {
- if (resp.success) {
- this.$message({
- showClose: true,
- type: "success",
- message: resp.msg,
- });
- this.editDialog = false;
- this.getList();
- } else {
- // 根据resp.code进行异常情况处理
- }
- })
- .catch(() => {});
- this.reset();
- },
reset() {
this.form = {};
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue
index a4e3ea79..0cbb3a0f 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue
@@ -7,8 +7,8 @@
{{ searchxianshitit }}
@@ -40,8 +40,6 @@
-
-
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue
index ff3b12b9..931776df 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue
@@ -3,7 +3,7 @@