From 77c7b741c00ea1e400ae308b613bee9cb2a212a2 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 29 Jul 2022 08:58:52 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhny_web
---
src/router/views/index.js | 2
src/views/farmplant/inventorylist.vue | 75 +++++++++++-------
src/views/farmplant/salelist.vue | 51 ++++++++----
src/views/soldrecord/soldrecord.vue | 6 +
src/views/farmplant/retrievallist.vue | 54 ++++++++----
src/views/farm/farm.vue | 1
src/views/statistics/stock.vue | 6 +
src/views/task/task.vue | 4 +
src/views/stock/stockout.vue | 6 +
9 files changed, 139 insertions(+), 66 deletions(-)
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 9ac2db8..8cb2bf4 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -126,7 +126,7 @@
component: Layout,
children: [{
path: '/stockout',
- name: '已出资待使用农资',
+ name: '已出库待使用农资',
meta: {
i18n: 'index',
},
diff --git a/src/views/farm/farm.vue b/src/views/farm/farm.vue
index 5dd9d8a..e2175bf 100644
--- a/src/views/farm/farm.vue
+++ b/src/views/farm/farm.vue
@@ -180,6 +180,7 @@
label:"360全景地址",
prop:"panoramic",
labelWidth:145,
+ hide:true,
rules:[{
required:false,
message:"请输入地址",
diff --git a/src/views/farmplant/inventorylist.vue b/src/views/farmplant/inventorylist.vue
index 9f9b98e..03d6684 100644
--- a/src/views/farmplant/inventorylist.vue
+++ b/src/views/farmplant/inventorylist.vue
@@ -1,17 +1,21 @@
<template>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :permission="permissionList"
- :before-open="beforeOpen"
- :page.sync="page"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
- </avue-crud>
+ <basic-container>
+ <avue-crud :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ :page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad">
+ </avue-crud>
+ </basic-container>
</template>
<script>
@@ -52,8 +56,21 @@
menu: false,
column:[
{
- label: "品种名",
- prop :"strainName",
+ label: "品种",
+ prop :"strainId",
+ search:true,
+ hide:true,
+ display:true,
+ type:"select",
+ dicUrl:'api/strain/strain-tree',
+ props:{
+ label:"strainName",
+ value:"id"
+ }
+ },
+ {
+ label: "品种",
+ prop :"strainName"
},
{
label: "损耗数量",
@@ -71,23 +88,13 @@
label:"损耗时间",
prop:"lossTime",
},
- ],
+ ],
},
data:[],
};
},
- mounted(){
- this.initData();
- },
+
methods: {
- initData(){
- getInventoryPage(this.page.currentPage,this.page.pageSize).then((res)=>{
- if(res.data.code == 200){
- this.data = res.data.data.records
- this.page.total = res.data.data.total
- }
- })
- },
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
@@ -106,11 +113,21 @@
this.loading = false;
}
})
- }
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
}
}
</script>
<style>
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/farmplant/retrievallist.vue b/src/views/farmplant/retrievallist.vue
index 1e15d5e..aad175b 100644
--- a/src/views/farmplant/retrievallist.vue
+++ b/src/views/farmplant/retrievallist.vue
@@ -1,5 +1,6 @@
<template>
-<avue-crud :option="option"
+ <basic-container>
+ <avue-crud :option="option"
:table-loading="loading"
:data="data"
ref="crud"
@@ -7,11 +8,14 @@
:permission="permissionList"
:before-open="beforeOpen"
:page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
</avue-crud>
+ </basic-container>
</template>
<script>
@@ -53,15 +57,28 @@
column:[
{
label: "品种",
- prop :"strainName",
+ prop :"strainId",
+ search:true,
+ hide:true,
+ display:true,
+ type:"select",
+ dicUrl:'api/strain/strain-tree',
+ props:{
+ label:"strainName",
+ value:"id"
+ }
+ },
+ {
+ label: "品种",
+ prop :"strainName"
},
{
label: "出库数量",
prop :"saleNum",
},
{
- label: "出库去向",
- prop :"district",
+ label:"销售地",
+ prop:"saleDestination2"
},
{
label: "备注",
@@ -71,24 +88,13 @@
label:"出库时间",
prop:"createTime",
},
- ],
+ ],
},
data:[],
};
},
- mounted(){
- this.initData();
- },
methods: {
- initData(){
- getPage(this.page.currentPage,this.page.pageSize).then((res)=>{
- if(res.data.code == 200){
- this.data = res.data.data.records
- this.page.total = res.data.data.total
- }
- })
- },
- currentChange(currentPage) {
+ currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
@@ -106,11 +112,21 @@
this.loading = false;
}
})
- }
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
}
}
</script>
<style>
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/farmplant/salelist.vue b/src/views/farmplant/salelist.vue
index 94a45a6..f0f558b 100644
--- a/src/views/farmplant/salelist.vue
+++ b/src/views/farmplant/salelist.vue
@@ -1,4 +1,5 @@
<template>
+ <basic-container>
<avue-crud :option="option"
:table-loading="loading"
:data="data"
@@ -7,11 +8,14 @@
:permission="permissionList"
:before-open="beforeOpen"
:page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
</avue-crud>
+ </basic-container>
</template>
<script>
@@ -53,15 +57,28 @@
column:[
{
label: "品种",
- prop :"strainName",
+ prop :"strainId",
+ search:true,
+ hide:true,
+ display:false,
+ type:"select",
+ dicUrl:'api/strain/strain-tree',
+ props:{
+ label:"strainName",
+ value:"id"
+ }
+ },
+ {
+ label: "品种",
+ prop :"strainName"
},
{
label: "销售数量",
prop :"saleNum",
},
{
- label: "销售地",
- prop :"district",
+ label:"销售地",
+ prop:"saleDestination2"
},
{
label: "销售价格",
@@ -75,23 +92,13 @@
label:"销售时间",
prop:"saleTime",
},
- ],
+ ],
},
data:[],
};
},
- mounted(){
- this.initData();
- },
methods: {
- initData(){
- getPage(this.page.currentPage,this.page.pageSize).then((res)=>{
- if(res.data.code == 200){
- this.data = res.data.data.records
- this.page.total = res.data.data.total
- }
- })
- },
+
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
@@ -110,11 +117,21 @@
this.loading = false;
}
})
- }
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
}
}
</script>
<style>
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/soldrecord/soldrecord.vue b/src/views/soldrecord/soldrecord.vue
index 6eaa074..f4b4d56 100644
--- a/src/views/soldrecord/soldrecord.vue
+++ b/src/views/soldrecord/soldrecord.vue
@@ -112,6 +112,12 @@
span: 6,
prop: "amount1",
},
+ {
+ label:"变更时间",
+ disabled:true,
+ span:6,
+ prop:"createTime"
+ }
]
},
data: []
diff --git a/src/views/statistics/stock.vue b/src/views/statistics/stock.vue
index 0c41016..2417182 100644
--- a/src/views/statistics/stock.vue
+++ b/src/views/statistics/stock.vue
@@ -202,6 +202,12 @@
return prev;
}
}, 0);
+ // sums[index] += " 公斤";
+ var x = String(sums[index]).indexOf(".")+1;//得到小数点的位置
+ var y = String(sums[index]).length - x;//小数点的位数
+ if(y>4){
+ sums[index] = sums[index].toFixed(3)
+ }
sums[index] += " 公斤";
} else {
sums[index] = "N/A";
diff --git a/src/views/stock/stockout.vue b/src/views/stock/stockout.vue
index 0cfa20c..fb4b348 100644
--- a/src/views/stock/stockout.vue
+++ b/src/views/stock/stockout.vue
@@ -230,6 +230,12 @@
}
);
}
+ //退回数量未填写
+ if(row.spn == null || row.span==""){
+ this.$message.warning("退回数量不能为空,请填写退回数量");
+ done()
+ }
+
},
//农资类型select 改变事件
stypeChange(value) {
diff --git a/src/views/task/task.vue b/src/views/task/task.vue
index 967651d..7dfabce 100644
--- a/src/views/task/task.vue
+++ b/src/views/task/task.vue
@@ -97,6 +97,7 @@
selection: true,
dialogClickModal: false,
gradeBoxVisible: false,
+ disabled:false,
column: [
{
label: "任务名称",
@@ -707,6 +708,9 @@
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
+ if(type=="edit"){
+ this.form.status==0?this.option.disabled=true:this.option.disabled=false
+ }
}
done();
},
--
Gitblit v1.9.3