瀏覽代碼

组件升级

asd26269546 2 年之前
父節點
當前提交
8ab9f8366d

+ 0 - 9
src/components/login-form/login-form.vue

@@ -23,18 +23,9 @@
 			></Input>
 		</FormItem>
 		<FormItem>
-			<Input
-				size="large"
-				v-model="form.code"
-				placeholder="请输入验证码"
-				prefix="ios-contact-outline"
-			></Input>
-		</FormItem>
-		<FormItem>
 			<Checkbox v-model="remember">记住用户名</Checkbox>
 			
 		</FormItem>
-		<img @click="getCodeImg" :src="image" alt=""></img>
 		<FormItem>
 			<Button size="large" @click="login" type="primary" long
 				>登录</Button

+ 30 - 8
src/components/my-modal-form/my-modal-material.vue

@@ -152,7 +152,7 @@ export default {
         }
       ],
       params: {
-        pageIndex: 1,
+        pageNum: 1,
         pageSize: 20,
         total: 0
       },
@@ -205,7 +205,21 @@ export default {
     getCheckedNodes () {
       return this.$refs.tree.getCheckedNodes()
     },
+    treeInit(data){
+      for (let i = 0; i < data.length; i++) {
+        const element = data[i]; 
+        element.title = element.name
+        element.value = element.code
+        element.label = element.name
+        if(element.children && element.children.length > 0) this.treeInit(element.children)
+      }
+    },
     getTree () {
+      const v = this
+      v.$post('/api/storage-restructure/materialClassify/tree').then(res=>{
+        v.treeInit(res.data)
+        this.treeData = res.data
+      })
       GetMaterialCategoryZTree().then(res => {
         if (res.code === 0) {
           this.treeData = res.result
@@ -213,12 +227,20 @@ export default {
       })
     },
     getList () {
-      GetMaterialPageList(this.params).then(res => {
-        if (res.code === 0) {
-          this.data = res.result.list
-          this.params.total = res.result.totalCount
-        }
+
+      this.$post('/api/storage-restructure/material/page',this.params).then(res=>{
+        
+        this.data = res.data.records
+        this.params.total = res.data.pages
+
+        console.log(res)
       })
+      // GetMaterialPageList(this.params).then(res => {
+      //   if (res.code === 0) {
+      //     this.data = res.result.list
+      //     this.params.total = res.result.totalCount
+      //   }
+      // })
     },
     initData (array) {
       array.forEach(item => {
@@ -236,8 +258,8 @@ export default {
         this.checkedList = [ ...selection ]
       }
     },
-    changePage (pageIndex) {
-      this.params.pageIndex = pageIndex
+    changePage (pageNum) {
+      this.params.pageNum = pageNum
       this.getList()
     },
     // 检索条件事件处理

+ 2 - 2
src/libs/http.js

@@ -137,7 +137,7 @@ export function get(url, params = {}) {
         if(process.env.NODE_ENV == "development"){
             var getUrl = "http://" + window.location.host + "" + url
         }else{
-            var getUrl = "https://" + window.location.host + "/api" + url
+            var getUrl = "https://" + window.location.host + url
         }
         axios.get(getUrl, {params:params})
             .then(response => {
@@ -163,7 +163,7 @@ export function post(url, data = {},params,headers) {
         if(process.env.NODE_ENV == "development"){
             var postUrl = "http://" + window.location.host + url
         }else{
-            var postUrl = "https://" + window.location.host +'/api' + url
+            var postUrl = "https://" + window.location.host + url
         }
         axios.post(postUrl, data ,{
             params:params,

+ 58 - 20
src/view/base-manage/material-maintenance/material-maintenance.vue

@@ -181,11 +181,28 @@ export default {
           key: 'technologyType',
           label: '物料属性',
           placeholder: '请选择物料属性',
-          list: []
+          list: [
+            {
+              label: "直喷",
+              value: "0"
+            },{
+              label: "热转",
+              value: "1"
+            },{
+              label: "打纸",
+              value: "2"
+            },{
+              label: "墨水",
+              value: "3"
+            },{
+              label: "其他",
+              value: "4"
+            }
+          ],
         },
         {
           type: 'treeSelect',
-          key: 'categoryCode',
+          key: 'materialClassifyId',
           label: '物料类型',
           placeholder: '请选择物料物料类型',
           list: []
@@ -224,9 +241,9 @@ export default {
           title: '物料属性',
           key: 'technologyType',
           minWidth: 100,
-          // render: (h, params) => {
-          //   return h('span', this.formConfig[8].list.filter(item => item.value === String(params.row.technologyType))[0].label)
-          // }
+          render: (h, params) => {
+            return h('span', this.technologyList[params.row.technologyType].label)
+          }
         },
         {
           title: '门幅',
@@ -337,10 +354,28 @@ export default {
         }
       ],
       params: {
-        pageIndex: 1,
+        pageNum: 1,
         pageSize: 20,
         total: 0
       },
+      technologyList:[
+        {
+          label: "直喷",
+          value: "0"
+        },{
+          label: "热转",
+          value: "1"
+        },{
+          label: "打纸",
+          value: "2"
+        },{
+          label: "墨水",
+          value: "3"
+        },{
+          label: "其他",
+          value: "4"
+        }
+      ],
       data: [],
       treeData: []
     }
@@ -372,11 +407,13 @@ export default {
           }
         })
       } else if (type === 'edit') {
-        MaterialUpdate(data).then(res => {
-          if (res.code === 0) {
-            this.show = false
+        this.$post('/api/storage-restructure/material/editFlowCreate',{
+          ...data,
+        }).then(res => {
+          if (res.code === 200) {
             this.$Message.info(res.msg)
             this.getList()
+            this.show = false
           }
         })
       }
@@ -384,7 +421,9 @@ export default {
     treeInit(data){
       for (let i = 0; i < data.length; i++) {
         const element = data[i]; 
+        element.title = element.name
         element.value = element.code
+        element.label = element.name
         if(element.children && element.children.length > 0) this.treeInit(element.children)
       }
     },
@@ -429,15 +468,15 @@ export default {
       //   }
       // })
     },
-    changePage (pageIndex) {
-      this.params.pageIndex = pageIndex
+    changePage (pageNum) {
+      this.params.pageNum = pageNum
       this.getList()
     },
     // 检索条件事件处理
     eventHandle (option) {
       switch (option._evnet) {
         case 'search':
-          this.params.pageIndex = 1
+          this.params.pageNum = 1
           this.params.key = option.key
           this.params.categoryCode = option.categoryCode
           this.getList()
@@ -462,7 +501,7 @@ export default {
       console.log(data)
       this.categoryCode = data.code
       this.params.categoryCode = data.code
-      this.params.pageIndex = 1
+      this.params.pageNum = 1
       this.params.total = 0
       this.getList()
     },
@@ -476,9 +515,6 @@ export default {
           if (res.code === 200) {
             this.$Message.info(res.msg)
             this.getTree()
-          }else{
-            alert(123123123)
-            this.$Message.info(res.msg)
           }
         })
         // AddMaterialCategory({
@@ -493,16 +529,18 @@ export default {
       } else if (type === 'edit') {
         console.log('data.data.id-----------')
         console.log(data)
-        UpdateMaterialCategory({
+        this.$post('/api/storage-restructure/materialClassify/edit',{
           ...data,
-          id: data.data.id
+          id:data.id
         }).then(res => {
-          if (res.code === 0) {
+          if (res.code === 200) {
             this.$Message.info(res.msg)
             this.getTree()
           }
         })
+        
       } else if (type === 'del') {
+
         DeleteMaterialCategory({ code: target.value }).then(res => {
           if (res.code === 0) {
             this.$Message.info(res.msg)
@@ -515,7 +553,7 @@ export default {
   mounted () {
     this.getList()
     this.getTree()
-    this.getTechnologyTypList()
+    //this.getTechnologyTypList()
   }
 }
 </script>

+ 17 - 12
src/view/base-manage/material-maintenance/setting-form.vue

@@ -66,26 +66,31 @@ export default {
     modal (n) {
       this.$emit('input', n)
       if (n) {
-        GetMaterialSet().then(res => {
-          if (res.code === 0) {
-            this.delayPeriod = res.result.delayPeriod
-            this.everyDayCheckCount = res.result.everyDayCheckCount
+        this.$post('/api/storage-restructure/material/getDelayPeriod').then(res => {
+          if (res.code === 200) {
+            
+            this.delayPeriod = res.data
           }
         })
+        // GetMaterialSet().then(res => {
+        //   if (res.code === 0) {
+        //     this.delayPeriod = res.result.delayPeriod
+        //     this.everyDayCheckCount = res.result.everyDayCheckCount
+        //   }
+        // })
       }
     }
   },
   methods: {
     cfm () {
-      SaveMaterialSet({
-        delayPeriod: this.delayPeriod,
-        everyDayCheckCount: this.everyDayCheckCount
+      this.$post('/api/storage-restructure/material/setDelayPeriod',{
+        value:this.delayPeriod
       }).then(res => {
-        if (res.code === 0) {
-          this.$Message.info(res.msg || '设置成功!')
-          this.modal = false
-        }
-      })
+          if (res.code === 200) {
+            this.$Message.info(res.msg || '设置成功!')
+            this.modal = false
+          }
+        })
     },
     cancel () {
       this.modal = false

+ 1 - 1
src/view/base-manage/provider-maintenance/my-form.vue

@@ -180,7 +180,7 @@ export default {
     modal (n) {
       this.$emit('input', n)
       if (n) {
-        this.getChangePriceContractList()
+        //this.getChangePriceContractList()
         // // 供应商
         // GetFactorySelectItem().then(res => {
         //   if (res.code === 0) {

+ 6 - 13
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -951,7 +951,7 @@ export default {
               },
               on: {
                 click: () => {
-                  axios.post('/cloudApi/supplier/getSafetyWarnDayBySupplier',{supplierId:p.row.id}).then(res=>{
+                  axios.post('/api/storage-restructure/supplier/getSafetyWarnDayBySupplier',{supplierId:p.row.id}).then(res=>{
                     this.accountDateRemarkModalData = res.data.data
                     this.accountDateRemarkModal = true
                   })
@@ -1251,17 +1251,11 @@ export default {
     },
     getList () {
       axios
-				.post('/cloudApi/supplier/list', {...this.params})
+				.post('/api/storage-restructure/supplier/page', {...this.params})
 				.then((res) => {
-					this.data = res.data.data
-          
-				})
-      axios
-				.post('/cloudApi/supplier/list/count', {...this.params})
-				.then((res) => {
-          this.params.total = res.data.data
-				})
-        
+					this.data = res.data.records
+          this.params.total = res.data.pages
+				})        
       // GetFactoryPageList(this.params).then(res => {
       //   if (res.code === 0) {
       //     this.data = res.result.list
@@ -1272,8 +1266,7 @@ export default {
     getMaterialSelectPurposeList(){
       const v = this
       v.loading = true
-      axios
-        .get('/cloudApi/material/selectPurposeList?purpose=' + '', {})
+      v.post('/api/storage-restructure/supplier/getStatistics' + '', {})
         .then((res) => {
           for (let i = 0; i < res.data.data.length; i++) {
             const element = res.data.data[i];

+ 50 - 28
src/view/base-manage/provider-maintenance/provider-price-maintenance.vue

@@ -212,7 +212,7 @@ export default {
         },
         {
           title: '供应商',
-          key: 'facName',
+          key: 'supplierName',
           minWidth: 200
         },
         {
@@ -222,7 +222,7 @@ export default {
         },
         {
           title: '采购周期',
-          key: 'period',
+          key: 'safetyWarnDay',
           minWidth: 150
         },
         {
@@ -328,7 +328,7 @@ export default {
         }
       ],
       params: {
-        pageIndex: 1,
+        pageNum: 1,
         pageSize: 20,
         total: 0
       }
@@ -364,7 +364,7 @@ export default {
     eventHandle (option) {
       switch (option._evnet) {
         case 'search':
-          this.params.pageIndex = 1
+          this.params.pageNum = 1
           this.params.key = option.key
           this.getList()
           break
@@ -376,44 +376,66 @@ export default {
           this.$router.go(-1)
           break
         case 'export':
-          GetFacPricePageList({
-            ...this.params,
-            pageIndex: 1,
-            pageSize: 99999
-          }).then(res => {
-            if (res.code === 0) {
-              let data = res.result.list
+          this.$post('/api/storage-restructure/supplierPrice/list',{
+            pageNum:1,
+            pageSize:500,
+          }).then(res=>{
+            if(res.code == 200){
+              let data = res.data.records
               if (data.length < 1) return this.$Message.error('数据为空!')
               exportExcel(this.columns, data, '价格维护')
             }
           })
+          
           break
       }
     },
-    changePage (pageIndex) {
-      this.params.pageIndex = pageIndex
+    changePage (pageNum) {
+      this.params.pageNum = pageNum
       this.getList()
     },
     getList () {
-      GetFacPricePageList(this.params).then(res => {
-        if (res.code === 0) {
-          this.data = res.result.list
-          this.params.total = res.result.totalCount
-        }
+      const v = this
+      v.$post('/api/storage-restructure/supplierPrice/page',this.params).then(res=>{
+        
+        this.data = res.data.records
+        this.params.total = res.data.pages
+
+        console.log(res)
       })
+      // GetFacPricePageList(this.params).then(res => {
+      //   if (res.code === 0) {
+      //     this.data = res.result.list
+      //     this.params.total = res.result.totalCount
+      //   }
+      // })
     },
     getFactorySelectItem () {
-      GetFactorySelectItem().then(res => {
-        if (res.code === 0) {
-          // this.factorySelect = res.result
-          this.formConfig[0].list = res.result.map(item => {
-            return {
-              ...item,
-              label: item.text
-            }
-          })
-        }
+      this.$post('/api/storage-restructure/supplier/page',{
+        pageNum: 1,
+        pageSize: 500,
+      }).then(res=>{
+        
+        this.formConfig[0].list = res.result.map(item => {
+          return {
+            ...item,
+            label: item.text
+          }
+        })
+        console.log(res)
       })
+      
+      // GetFactorySelectItem().then(res => {
+      //   if (res.code === 0) {
+      //     // this.factorySelect = res.result
+      //     this.formConfig[0].list = res.result.map(item => {
+      //       return {
+      //         ...item,
+      //         label: item.text
+      //       }
+      //     })
+      //   }
+      // })
     }
   },
   mounted () {