diff --git a/src/views/user/userDetail.vue b/src/views/user/userDetail.vue index 36cd1b6..daf5e93 100644 --- a/src/views/user/userDetail.vue +++ b/src/views/user/userDetail.vue @@ -55,7 +55,6 @@ 修改 - 邀请师傅佣金比例 {{ tableData.shopRate ? `${tableData.shopRate}` : '0' }} @@ -212,7 +211,6 @@ - 证书 @@ -243,12 +241,10 @@ {{ artificer.content }} - - 师傅销量 {{ artificer.ordersCount ? artificer.ordersCount : 0 }} @@ -360,7 +356,6 @@ width="80" height="80"> - 资质证书 @@ -392,8 +387,6 @@ {{ consortia.consortiaContent }} - - 身份证姓名 {{ consortia.identityName }} @@ -581,7 +574,7 @@ @@ -773,7 +766,7 @@ @@ -847,7 +840,7 @@ @@ -934,8 +927,7 @@
用户评价数
- {{ guanzhuData.countTakingByUserId ? guanzhuData.countTakingByUserId : - 0 }}个 + {{ guanzhuData.countTakingByUserId ? guanzhuData.countTakingByUserId : 0 }}
@@ -985,8 +977,7 @@
待评价订单
- {{ guanzhuData.countOrderAppraise ? guanzhuData.countOrderAppraise : - 0 }}单 + {{ guanzhuData.countOrderAppraise ? guanzhuData.countOrderAppraise : 0 }}
@@ -1227,8 +1218,7 @@ @@ -1574,6 +1564,129 @@ 确 定 + + 新增 + 刷新 + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 入库量/出库量 + + +
+
+ 备注 + + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+ +
@@ -1853,9 +1966,7 @@ @@ -2412,8 +2523,254 @@ import { serverPaths } from '@/utils/enumData' }, ], historyArtificerName: "", + //我的物料部分 + myArtificerSelfGoods: { + init: () => { + let { queryParams, load } = this.myArtificerSelfGoods; + queryParams = {}; + load(); + }, + load: () => { + let { $route, myArtificerSelfGoods, } = this; + let { artificerId } = $route.query; + let { queryParams, pagination } = myArtificerSelfGoods; + myArtificerSelfGoods.tableDataLoading = true; + let params = { + artificerId, + page: pagination.page, + limit: pagination.limit, + ...queryParams, + } + //查询 + this.$http({ url: this.$http.adornUrl("blArtificerSelfGoods/list"), method: "get", params: this.$http.adornParams(params),}).then(({ data }) => { + let pageObj = ((data || {}).data || {}); + myArtificerSelfGoods.dataSoure = pageObj.records || []; + myArtificerSelfGoods.tableDataLoading = false; + pagination.page = pageObj.current || 1; + pagination.total = pageObj.total || 0; + }); + }, + tableDataLoading: false, + queryParams: {}, + dataSoure: [], + pagination: { + page: 1, + limit: 10, + total: 0, + handleSizeChange: (v) => { + this.myArtificerSelfGoods.pagination.limit = v; + this.myArtificerSelfGoods.load(); + }, + handleCurrentChange: (v) => { + this.myArtificerSelfGoods.pagination.page = v; + this.myArtificerSelfGoods.load(); + }, + }, + addPage: { + loading: false, + dialogFormVisible: false, + multipleSelection: [], + dataSoure: [], + model: { id: null, changeNum: null, remark: null}, + open: () => { + //打开新增页面 + let { myArtificerSelfGoods } = this; + let { addPage, model } = myArtificerSelfGoods; + addPage.dialogFormVisible = true; + + addPage.load(); + + }, + close: () => { + let { myArtificerSelfGoods } = this; + let { addPage } = myArtificerSelfGoods; + addPage.dialogFormVisible = false; + }, + ok: () => { + let { myArtificerSelfGoods } = this; + let { artificerId } = this.$route.query; + let { addPage } = myArtificerSelfGoods; + let { model, multipleSelection } = addPage; + + let isError = false; + + let saveList = multipleSelection.map(x => { + if(!x.changeNum || Number(x.changeNum) == 0){ + isError = true; + } + return { + artificerId, + selfGoodsId: x.id, + changeNum: x.changeNum, + remark: x.remark, + goods: x, + }; + }); + + if(isError){ + this.$message({ message: '请填写非0数字', type: 'warning' }); + return; + } + + + let params = saveList + + console.log(`🚀 ---------------------------🚀`); + console.log(`🚀 ~ data ~ params:`, params); + console.log(`🚀 ---------------------------🚀`); + + this.$http({ url: this.$http.adornUrl("blArtificerSelfGoods/addList"), method: "post", data: this.$http.adornData(params),}).then(({ data }) => { + if(data.code == 0){ + this.$message({ message: '操作成功', type: 'success', duration: 1500 }); + addPage.close(); + myArtificerSelfGoods.load(); + } else { + this.$message({ message: '操作失败:' + data.msg, type: 'error', duration: 1500 }); + } + + }); + }, + load: () => { + let { myArtificerSelfGoods } = this; + let { addPage } = myArtificerSelfGoods; + + addPage.loading = true; + + let params = { + 'page': 0, + 'size': -1, + // 'title': '物料包', + 'pTypeId': '56', + 'status': 1 + } + this.$http({ url: this.$http.adornUrl("goods/list"), method: "get", params: this.$http.adornParams(params),}).then(({ data }) => { + addPage.loading = false; + let returnData = data.data; + addPage.dataSoure = returnData.content; + // this.totalnum = returnData.totalElements + + }); + }, + handleSelectionChange: (rows) => { + let { myArtificerSelfGoods } = this; + let { addPage } = myArtificerSelfGoods; + addPage.multipleSelection = rows; + } + }, + editPage: { + dialogFormVisible: false, + loading: false, + model: { id: null, changeNum: null, remark: null}, + open: (record) => { + //打开新增页面 + let { myArtificerSelfGoods } = this; + let { editPage } = myArtificerSelfGoods; + editPage.dialogFormVisible = true; + editPage.model = Object.assign({}, record); + editPage.load(); + }, + close: () => { + let { myArtificerSelfGoods } = this; + let { editPage } = myArtificerSelfGoods; + editPage.dialogFormVisible = false; + }, + ok: () => { + let { myArtificerSelfGoods } = this; + let { editPage } = myArtificerSelfGoods; + let { model } = editPage; + //验证 + if(!model.changeNum || Number(model.changeNum) == 0){ + this.$message({ message: '请填写非0数字', type: 'warning' }); + return; + } + + let params = { ...model }; + this.$http({ url: this.$http.adornUrl("blArtificerSelfGoods/update"), method: "post", data: this.$http.adornData(params),}).then(({ data }) => { + if(data.code == 0){ + this.$message({ message: '操作成功', type: 'success', duration: 1500 }); + editPage.close(); + myArtificerSelfGoods.load(); + } else { + this.$message({ message: '操作失败:' + data.msg, type: 'error', duration: 1500 }); + } + }); + }, + load: () => { + let { myArtificerSelfGoods } = this; + let { editPage } = myArtificerSelfGoods; + let { model } = editPage; + editPage.loading = true; + this.$http({ url: this.$http.adornUrl("blArtificerSelfGoods/info/"+model.id), method: "get",}).then(({ data }) => { + editPage.loading = false; + editPage.model = data.data; + }); + } + }, + logPage: { + dialogFormVisible: false, + loading: false, + model: { id: null, changeNum: null, remark: null}, + open: (record) => { + //打开新增页面 + let { myArtificerSelfGoods } = this; + let { logPage } = myArtificerSelfGoods; + logPage.dialogFormVisible = true; + logPage.model = Object.assign({}, record); + logPage.load(); + }, + load: () => { + let { $route, myArtificerSelfGoods, } = this; + let { artificerId } = $route.query; + let { logPage } = myArtificerSelfGoods; + let { model, pagination } = logPage; + logPage.tableDataLoading = true; + let params = { + artificerId, + selfGoodsId: model.selfGoodsId, + page: pagination.page, + limit: pagination.limit, + } + //查询 + this.$http({ url: this.$http.adornUrl("blArtificerSelfGoodsEntryExitRecords/list"), method: "get", params: this.$http.adornParams(params),}).then(({ data }) => { + let pageObj = ((data || {}).data || {}); + logPage.dataSoure = pageObj.records || []; + logPage.tableDataLoading = false; + pagination.page = pageObj.current || 1; + pagination.total = pageObj.total || 0; + }); + }, + tableDataLoading: false, + queryParams: {}, + dataSoure: [], + pagination: { + page: 1, + limit: 10, + total: 0, + handleSizeChange: (v) => { + this.myArtificerSelfGoods.logPage.pagination.limit = v; + this.myArtificerSelfGoods.logPage.load(); + }, + handleCurrentChange: (v) => { + this.myArtificerSelfGoods.logPage.pagination.page = v; + this.myArtificerSelfGoods.logPage.load(); + }, + } + } + } }; }, + filters: { + numFilter(value) { + let realVal = '' + if (!isNaN(value) && value !== '') { + // 截取当前数据到小数点后两位 + realVal = parseFloat(value).toFixed(2) + } else { + realVal = '--' + } + return realVal + } + }, methods: { // 点击图片进行放大 imgShow(e) { @@ -2615,6 +2972,9 @@ import { serverPaths } from '@/utils/enumData' if (tab._props.label == "商家详情") { this.shopsSelect(); } + if (tab._props.label == "我的物料") { + this.myArtificerSelfGoods.init(); + } }, handleSizeChangeTx(val) { this.limit = val; diff --git a/src/views/user/userList.vue b/src/views/user/userList.vue index b76f2b0..51d53ed 100644 --- a/src/views/user/userList.vue +++ b/src/views/user/userList.vue @@ -107,7 +107,6 @@ 修改 - @@ -116,7 +115,6 @@ 修改 - @@ -272,7 +270,6 @@ 修改 -
@@ -281,7 +278,6 @@ 修改 - @@ -431,7 +427,6 @@ 修改 -
@@ -440,7 +435,6 @@ 修改 - @@ -588,7 +582,6 @@ 修改 -
@@ -597,7 +590,6 @@ 修改 - @@ -745,7 +737,6 @@ 修改 - @@ -754,7 +745,6 @@ 修改 - @@ -902,7 +892,6 @@ 修改 - @@ -911,7 +900,6 @@ 修改 - @@ -1060,7 +1048,6 @@ 修改 - @@ -1069,7 +1056,6 @@ 修改 -