diff --git a/src/api/consumable.js b/src/api/consumable.js
index 8453a91..18c93ff 100644
--- a/src/api/consumable.js
+++ b/src/api/consumable.js
@@ -39,12 +39,19 @@ export function puttbConsType(data) {
* @returns
*/
export function gettbConsInfo(params) {
+ // return request({
+ // url: '/api/tbConsInfo',
+ // method: "get",
+ // params
+ // });
return request({
- url: '/api/tbConsInfo',
+ url: "/api/viewConInfoFlow",
method: "get",
- params
- });
+ params
+ });
}
+
+
/**
* 耗材入库
* @returns
diff --git a/src/views/invoicing/consumable/information.vue b/src/views/invoicing/consumable/information.vue
index 4c3a23e..0631742 100644
--- a/src/views/invoicing/consumable/information.vue
+++ b/src/views/invoicing/consumable/information.vue
@@ -13,99 +13,43 @@
@keyup.enter.native="getTableData"
/> -->
-
-
+
+
-
-
-
+
+
+
-
-
+
+
查询
重置
- 导出耗材
- 导入耗材
+ 导出耗材
+ 导入耗材
- 添加
+ 添加
-
-
+
+
-
@@ -113,10 +57,42 @@
{{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
+
+
+
+ {{ scope.row.balance }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.productName }}
+
+
+
- {{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }}
+ {{ (scope.row.balance).toFixed(2) }}
+
@@ -128,24 +104,13 @@
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
-->
-
+
- 编辑
- 耗材记录
- 耗材盘点
+ 编辑
+ 耗材记录
+ 耗材盘点
+ 查看详情
@@ -159,44 +124,23 @@
- {
- tableData.size = e;
- tableData.page = 0;
- getTableData();
- }
- "
- />
+ {
+ tableData.size = e;
+ tableData.page = 0;
+ getTableData();
+ }
+ " />
-
+
-
+
取 消
- 确 定
+ 确 定
@@ -205,33 +149,18 @@
-
+
-
+
-
+
-
-
+
+
@@ -252,10 +181,7 @@
>
-->
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
@@ -508,19 +360,18 @@
import Sortable from "sortablejs";
import dayjs from "dayjs";
import settings from "@/settings";
-import { upProSort } from "@/api/shop";
-function returnPromise(index,prosise){
- return new Promise((resolve,reject)=>{
- prosise.then(res=>{
- console.log(res);
- resolve({sucees:true})
- }).catch(err=>{
- console.log(err);
- resolve({sucees:false})
- })
- })
- }
+function returnPromise(index, prosise) {
+ return new Promise((resolve, reject) => {
+ prosise.then(res => {
+ console.log(res);
+ resolve({ sucees: true })
+ }).catch(err => {
+ console.log(err);
+ resolve({ sucees: false })
+ })
+ })
+}
import {
gettbConsType,
gettbConsInfo,
@@ -533,8 +384,10 @@ import AddConsTakin from "../components/addConsTakin";
import { tbConsInfodownload, tbConsInfoinputStock } from '@/api/invoicing'
import { downloadFile } from "@/utils";
import UploadExcel from '@/components/UploadExcel'
+import consRecordDetail from "../components/cons_record_detail";
+
export default {
- components: { AddConsTakin, UploadExcel },
+ components: { AddConsTakin, UploadExcel, consRecordDetail },
data() {
return {
dayjs,
@@ -599,7 +452,7 @@ export default {
total: 0
},
ruleFormLoading: false,
- ruleForms:[],
+ ruleForms: [],
ruleForm: {
conCode: "",
conName: "",
@@ -652,27 +505,33 @@ export default {
this.gettbConsType()
},
methods: {
+ lookDetail(row) {
+ this.$refs.recodeDetail.open({
+ "consId": row.consId,
+ "conName": row.conName
+ })
+ },
//解决selectc值改变后未验证问题
- selectChange($event,ref,type){
+ selectChange($event, ref, type) {
this.$refs[ref][0].validateField(type)
},
//重置添加耗材表单
- resetRuleForms(){
- this.ruleForms=[{...this.ruleForm}]
- this.$refs['refruleForm0']&&this.$refs['refruleForm0'][0].resetFields()
+ resetRuleForms() {
+ this.ruleForms = [{ ...this.ruleForm }]
+ this.$refs['refruleForm0'] && this.$refs['refruleForm0'][0].resetFields()
},
//添加耗材弹窗删除
- ruleFormsReduce(index){
- if(this.ruleForms.length>1){
- this.ruleForms.splice(index,1)
- }else{
+ ruleFormsReduce(index) {
+ if (this.ruleForms.length > 1) {
+ this.ruleForms.splice(index, 1)
+ } else {
this.$message({ type: "error", message: "至少保留一种耗材" });
}
},
//添加耗材弹窗增加
- ruleFormsAdd(){
+ ruleFormsAdd() {
console.log('add')
- this.ruleForms.push({...this.ruleForm})
+ this.ruleForms.push({ ...this.ruleForm })
},
// 导入耗材
async excelSuccessUpload(file) {
@@ -689,6 +548,22 @@ export default {
console.log(error);
}
},
+ computedClass(num) {
+ if (num > 0) {
+ return 'green'
+ } else {
+ return 'red'
+ }
+ },
+ // 状态切换
+ async showChange(e, row) {
+ await postapitbConsInfo([{
+ id: row.consId,
+ "isCheck": row.isCheck,
+ shopId: localStorage.getItem('shopId')
+ }])
+ this.$message.success('修改成功')
+ },
// 耗材导出
async protHandle() {
try {
@@ -707,7 +582,8 @@ export default {
for (let key in this.ruleForm) {
this.ruleForm[key] = row[key];
}
- this.ruleForm.id = row.id;
+ console.log(row, '调试1')
+ this.ruleForm.id = row.consId;
this.dialogshow = true;
},
// 重置查询
@@ -822,7 +698,7 @@ export default {
});
} else {
this.dialogtitle = "编辑";
- this.ruleForm.id = item.id;
+ this.ruleForm.id = item.consId;
this.ruleForm.conTypeId = item.conTypeId;
this.ruleForm.conCode = item.conCode;
this.ruleForm.conName = item.conName;
@@ -832,17 +708,17 @@ export default {
}
this.dialogshow = true;
},
- //添加
+ //添加
async submitForms() {
- let isAllPassForm=0
- for(let i in this.ruleForms){
- const res=await returnPromise(i,this.$refs['refruleForm'+i][0].validate())
+ let isAllPassForm = 0
+ for (let i in this.ruleForms) {
+ const res = await returnPromise(i, this.$refs['refruleForm' + i][0].validate())
console.log(res)
- isAllPassForm+=res.sucees?1:0
+ isAllPassForm += res.sucees ? 1 : 0
}
//判断验证是否通过
- if(isAllPassForm===this.ruleForms.length){
- await posttbConsInfo( this.ruleForms)
+ if (isAllPassForm === this.ruleForms.length) {
+ await posttbConsInfo(this.ruleForms)
this.$message({ type: "success", message: "添加成功" });
// for(let i of this.ruleForms){
@@ -850,9 +726,9 @@ export default {
// this.$message({ type: "success", message: "添加成功" });
// }
this.dialogshow = false;
- this.resetRuleForms()
- this.ruleFormLoading = false;
- this.getTableData();
+ this.resetRuleForms()
+ this.ruleFormLoading = false;
+ this.getTableData();
}
},
//编辑
@@ -862,6 +738,7 @@ export default {
if (valid) {
this.ruleFormLoading = true;
if (this.dialogtitle == "编辑") {
+ console.log(this.ruleForm, '调试 ')
await postapitbConsInfo([this.ruleForm]);
this.$message({ type: "success", message: "编辑成功" });
this.dialogshow = false;
@@ -876,7 +753,7 @@ export default {
// this.$message({ type: "success", message: "添加成功" });
// }
-
+
}
this.dialogshow = false;
this.$refs[formName].resetFields();
@@ -934,11 +811,13 @@ export default {
cursor: pointer;
font-weight: 700;
}
+
.color-danger {
color: #f56c6c;
font-weight: 700;
cursor: pointer;
}
+
.row_wrap {
display: flex;
justify-content: space-between;
diff --git a/src/views/invoicing/goods_stoks.vue b/src/views/invoicing/goods_stoks.vue
index 06b41dc..91d0fc9 100644
--- a/src/views/invoicing/goods_stoks.vue
+++ b/src/views/invoicing/goods_stoks.vue
@@ -17,6 +17,11 @@
关
+
+
+
+
+
查询
重置
库存预警:{{ warnLine }}
@@ -155,6 +160,7 @@ export default {
montey: "",
categorys: [],
query: {
+ sort: "", // 排序
name: '',
isStock: '',
num: '',
@@ -233,7 +239,7 @@ export default {
const file = await stockdownload({
name: this.query.name,
isStock: this.query.isStock,
- num: this.query.num
+ num: this.query.num,
})
downloadFile(file, "商品库存", "xlsx");
this.downloadLoading = false;
@@ -309,6 +315,7 @@ export default {
isStock: this.query.isStock,
num: this.query.num,
categoryId: this.query.categoryId,
+ sort:this.query.sort,
shopId: localStorage.getItem('shopId')
})
this.tableData.loading = false
diff --git a/src/views/product/components/addGroup.vue b/src/views/product/components/addGroup.vue
index d7b0a09..3dac0e8 100644
--- a/src/views/product/components/addGroup.vue
+++ b/src/views/product/components/addGroup.vue
@@ -27,9 +27,21 @@
禁用
+
+
+ 启用
+ 禁用
+
+
+
+
+
+
+