zhengchengwu 6 年 前
コミット
17e8ae26b7
共有5 個のファイルを変更した135 個の追加232 個の削除を含む
  1. 2 2
      config/dev.env.js
  2. 2 2
      config/sit.env.js
  3. 115 161
      src/router/modules/stock.js
  4. 1 1
      src/views/layout/components/Navbar.vue
  5. 15 66
      src/xt_pages/stock/stockInOrderAdd.vue

+ 2 - 2
config/dev.env.js ファイルの表示

@@ -11,6 +11,6 @@ module.exports = {
11 11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 13
   XT_HOST: '"http://xt.test.sgjyun.com"',
14
-  MIRCO_MALL_HOST: '"http://mall.sgjyun.com"',
15
-  CDM_HOST: '"http://cdm.sgjyun.com"',
14
+  MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
15
+  CDM_HOST: '"http://cdm.test.sgjyun.com"',
16 16
 }

+ 2 - 2
config/sit.env.js ファイルの表示

@@ -6,6 +6,6 @@ module.exports = {
6 6
   SSO_HOST: '"http://testsso.sgjyun.com"',
7 7
   SRCM_HOST: '"http://test1.sgjyun.com"',
8 8
   XT_HOST: '"http://xt.test.sgjyun.com"',
9
-  MIRCO_MALL_HOST: '"http://mall.sgjyun.com"',
10
-  CDM_HOST: '"http://cdm.sgjyun.com"',
9
+  MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
10
+  CDM_HOST: '"http://cdm.test.sgjyun.com"',
11 11
 }

+ 115 - 161
src/router/modules/stock.js ファイルの表示

@@ -10,166 +10,120 @@ export default {
10 10
     title: 'stockManage',
11 11
     icon: 'stock'
12 12
   },
13
-  children: [{
14
-    path: '/stock/config',
15
-    component: () => import('@/xt_pages/stock/index'),
16
-    name: 'config',
17
-    meta: {
18
-      title: 'config'
19
-    }
20
-  },
21
-  {
22
-    path: '/stock/in',
23
-    component: () => import('@/xt_pages/stock/stockInOrder'),
24
-    name: 'stockInOrder',
25
-    meta: {
26
-      title: 'stockInOrder',
27
-      noCache: true
28
-    }
29
-  }, {
30
-    path: '/stock/in/other',
31
-    component: () => import('@/xt_pages/stock/otherStockInOrder'),
32
-    name: 'otherStockInOrder',
33
-    meta: {
34
-      title: 'otherStockInOrder',
35
-      noCache: true
36
-    }
37
-  }, {
38
-    path: '/stock/return',
39
-    component: () => import('@/xt_pages/stock/salesReturnOrder'),
40
-    name: 'salesReturnOrder',
41
-    meta: {
42
-      title: 'salesReturnOrder',
43
-      noCache: true
44
-    }
45
-  }, {
46
-    path: '/stock/return/other',
47
-    component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
48
-    name: 'otherSalesReturnOrder',
49
-    meta: {
50
-      title: 'otherSalesReturnOrder',
51
-      noCache: true
52
-    }
53
-  },
54
-  {
55
-    path: '/stock/out',
56
-    component: () => import('@/xt_pages/stock/stockOutOrder'),
57
-    name: 'stockOutOrder',
58
-    meta: {
59
-      title: 'stockOutOrder',
60
-      noCache: true
61
-    }
62
-  }, {
63
-    path: '/stock/out/other',
64
-    component: () => import('@/xt_pages/stock/otherStockOutOrder'),
65
-    name: 'otherStockOutOrder',
66
-    meta: {
67
-      title: 'otherStockOutOrder',
68
-      noCache: true
69
-    }
70
-  }, {
71
-    path: '/stock/cancel',
72
-    component: () => import('@/xt_pages/stock/cancelStockOrder'),
73
-    name: 'cancelStockOrder',
74
-    meta: {
75
-      title: 'cancelStockOrder',
76
-      noCache: true
77
-    }
78
-  }, {
79
-    path: '/stock/cancel/other',
80
-    component: () => import('@/xt_pages/stock/otherCancelStockOrder'),
81
-    name: 'otherCancelStockOrder',
82
-    meta: {
83
-      title: 'otherCancelStockOrder',
84
-      noCache: true
85
-    }
86
-  }, {
87
-    path: '/stock/query',
88
-    component: () => import('@/xt_pages/stock/stockQuery'),
89
-    name: 'stockQuery',
90
-    meta: {
91
-      title: 'stockQuery'
92
-    }
93
-  }, {
94
-    path: '/stock/detail',
95
-    component: () => import('@/xt_pages/stock/stockDetailIndex'),
96
-    name: 'stockDetail',
97
-    meta: {
98
-      title: 'stockDetail'
99
-    }
100
-  },
101
-  {
102
-    path: '/stock/in/add',
103
-    component: () => import('@/xt_pages/stock/stockInOrderAdd'),
104
-    name: 'stockInOrderAdd',
105
-    hidden: true,
106
-    is_menu: false,
107
-    meta: {
108
-      title: 'stockInOrderAdd'
109
-    }
110
-  }, {
111
-    path: '/stock/in/detail',
112
-    component: () => import('@/xt_pages/stock/stockInDetail'),
113
-    name: 'stockInDetail',
114
-    hidden: true,
115
-    is_menu: false,
116
-    meta: {
117
-      title: 'stockInDetail'
118
-    }
119
-  }, {
120
-    path: '/stock/return/detail',
121
-    component: () => import('@/xt_pages/stock/salesReturnDetail'),
122
-    name: 'salesReturnDetail',
123
-    hidden: true,
124
-    is_menu: false,
125
-    meta: {
126
-      title: 'salesReturnDetail'
127
-    }
128
-  }, {
129
-    path: '/stock/return/add',
130
-    component: () => import('@/xt_pages/stock/salesReturnOrderAdd'),
131
-    name: 'salesReturnOrderAdd',
132
-    hidden: true,
133
-    is_menu: false,
134
-    meta: {
135
-      title: 'salesReturnOrderAdd'
136
-    }
137
-  }, {
138
-    path: '/stock/out/add',
139
-    component: () => import('@/xt_pages/stock/stockOutOrderAdd'),
140
-    name: 'stockOutOrderAdd',
141
-    hidden: true,
142
-    is_menu: false,
143
-    meta: {
144
-      title: 'stockOutOrderAdd'
145
-    }
146
-  }, {
147
-    path: '/stock/out/detail',
148
-    component: () => import('@/xt_pages/stock/stockOutDetail'),
149
-    name: 'stockOutDetail',
150
-    hidden: true,
151
-    is_menu: false,
152
-    meta: {
153
-      title: 'stockOutDetail'
154
-    }
155
-  }, {
156
-    path: '/stock/cancel/add',
157
-    component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
158
-    name: 'cancelStockOrderAdd',
159
-    hidden: true,
160
-    is_menu: false,
161
-    meta: {
162
-      title: 'cancelStockOrderAdd'
163
-    }
164
-  }, {
165
-    path: '/stock/cancel/detail',
166
-    component: () => import('@/xt_pages/stock/cancelStockDetail'),
167
-    name: 'cancelStockDetail',
168
-    hidden: true,
169
-    is_menu: false,
170
-    meta: {
171
-      title: 'cancelStockDetail'
172
-    }
173
-  }
13
+  children: [
14
+        {
15
+          path: '/stock/in',
16
+          component: () => import('@/xt_pages/stock/stockInOrder'),
17
+          name: 'stockInOrder',
18
+          meta: { title: 'stockInOrder', noCache: true }
19
+        }, {
20
+          path: '/stock/return',
21
+          component: () => import('@/xt_pages/stock/salesReturnOrder'),
22
+          name: 'salesReturnOrder',
23
+          meta: { title: 'salesReturnOrder', noCache: true }
24
+        }, 
25
+        {
26
+          path: '/stock/out',
27
+          component: () => import('@/xt_pages/stock/stockOutOrder'),
28
+          name: 'stockOutOrder',
29
+          meta: { title: 'stockOutOrder', noCache: true }
30
+        },  {
31
+          path: '/stock/cancel',
32
+          component: () => import('@/xt_pages/stock/cancelStockOrder'),
33
+          name: 'cancelStockOrder',
34
+          meta: { title: 'cancelStockOrder', noCache: true }
35
+        },{
36
+          path: '/stock/in/other',
37
+          component: () => import('@/xt_pages/stock/otherStockInOrder'),
38
+          name: 'otherStockInOrder',
39
+          meta: { title: 'otherStockInOrder', noCache: true }
40
+        }, {
41
+          path: '/stock/return/other',
42
+          component: () => import('@/xt_pages/stock/otherSalesReturnOrder'),
43
+          name: 'otherSalesReturnOrder',
44
+          meta: { title: 'otherSalesReturnOrder', noCache: true }
45
+        },{
46
+          path: '/stock/out/other',
47
+          component: () => import('@/xt_pages/stock/otherStockOutOrder'),
48
+          name: 'otherStockOutOrder',
49
+          meta: { title: 'otherStockOutOrder', noCache: true }
50
+        }, {
51
+          path: '/stock/cancel/other',
52
+          component: () => import('@/xt_pages/stock/otherCancelStockOrder'),
53
+          name: 'otherCancelStockOrder',
54
+          meta: { title: 'otherCancelStockOrder', noCache: true }
55
+        }, {
56
+          path: '/stock/query',
57
+          component: () => import('@/xt_pages/stock/stockQuery'),
58
+          name: 'stockQuery',
59
+          meta: { title: 'stockQuery' }
60
+        }, {
61
+          path: '/stock/detail',
62
+          component: () => import('@/xt_pages/stock/stockDetailIndex'),
63
+          name: 'stockDetail',
64
+          meta: { title: 'stockDetail' }
65
+        },{
66
+          path: '/stock/in/add',
67
+          component: () => import('@/xt_pages/stock/stockInOrderAdd'),
68
+          name: 'stockInOrderAdd',
69
+          hidden: true,
70
+          is_menu: false,
71
+          meta: { title: 'stockInOrderAdd' }
72
+        }, {
73
+          path: '/stock/in/detail',
74
+          component: () => import('@/xt_pages/stock/stockInDetail'),
75
+          name: 'stockInDetail',
76
+          hidden: true,
77
+          is_menu: false,
78
+          meta: { title: 'stockInDetail' }
79
+        }, {
80
+          path: '/stock/return/detail',
81
+          component: () => import('@/xt_pages/stock/salesReturnDetail'),
82
+          name: 'salesReturnDetail',
83
+          hidden: true,
84
+          is_menu: false,
85
+          meta: { title: 'salesReturnDetail' }
86
+        }, {
87
+          path: '/stock/return/add',
88
+          component: () => import('@/xt_pages/stock/salesReturnOrderAdd'),
89
+          name: 'salesReturnOrderAdd',
90
+          hidden: true,
91
+          is_menu: false,
92
+          meta: { title: 'salesReturnOrderAdd' }
93
+        }, {
94
+          path: '/stock/out/add',
95
+          component: () => import('@/xt_pages/stock/stockOutOrderAdd'),
96
+          name: 'stockOutOrderAdd',
97
+          hidden: true,
98
+          is_menu: false,
99
+          meta: { title: 'stockOutOrderAdd', noCache: true }
100
+        }, {
101
+          path: '/stock/out/detail',
102
+          component: () => import('@/xt_pages/stock/stockOutDetail'),
103
+          name: 'stockOutDetail',
104
+          hidden: true,
105
+          is_menu: false,
106
+          meta: { title: 'stockOutDetail', noCache: true }
107
+        }, {
108
+          path: '/stock/cancel/add',
109
+          component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
110
+          name: 'cancelStockOrderAdd',
111
+          hidden: true,
112
+          is_menu: false,
113
+          meta: { title: 'cancelStockOrderAdd', noCache: true }
114
+        }, {
115
+          path: '/stock/cancel/detail',
116
+          component: () => import('@/xt_pages/stock/cancelStockDetail'),
117
+          name: 'cancelStockDetail',
118
+          hidden: true,
119
+          is_menu: false,
120
+          meta: { title: 'cancelStockDetail', noCache: true }
121
+        },
122
+        {
123
+          path: '/stock/config',
124
+          component: () => import('@/xt_pages/stock/index'),
125
+          name: 'config',
126
+          meta: { title: 'config' }
127
+        }
174 128
   ]
175 129
 }

+ 1 - 1
src/views/layout/components/Navbar.vue ファイルの表示

@@ -133,7 +133,7 @@
133 133
         return false
134 134
       },
135 135
       SCRMWebsit() {
136
-        return process.env.SCRM_HOST
136
+        return process.env.SRCM_HOST
137 137
       },
138 138
       MircoMallWebsit() {
139 139
         return process.env.MIRCO_MALL_HOST

+ 15 - 66
src/xt_pages/stock/stockInOrderAdd.vue ファイルの表示

@@ -159,15 +159,10 @@
159 159
             </template>
160 160
           </el-table-column>
161 161
 
162
-
163 162
           <el-table-column label="操作" align="center" fixed="right" width="150">
164 163
             <template slot-scope="scope">
165 164
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
166 165
 
167
-
168
-
169
-
170
-
171 166
                 <el-button
172 167
                   size="mini"
173 168
                   type="primary"
@@ -185,21 +180,13 @@
185 180
                 </el-button>
186 181
               </el-tooltip>
187 182
 
188
-
189 183
             </template>
190 184
           </el-table-column>
191 185
 
192
-
193
-
194
-
195
-
196
-
197 186
         </el-table>
198 187
       </el-form>
199 188
 
200 189
 
201
-
202
-
203 190
     </div>
204 191
   </div>
205 192
 
@@ -429,7 +416,6 @@
429 416
             this.dealer.splice(0, 0, { id: 0, dealer_name: '全部' })
430 417
             this.form.manufacturer = 0
431 418
             this.form.dealer = 0
432
-
433 419
           }
434 420
           loading.close()
435 421
 
@@ -568,29 +554,20 @@
568 554
       submit() {
569 555
         this.$refs['tableForm'].validate((valid) => {
570 556
           if (valid) {
571
-
572
-
573
-
574
-
575
-
576
-
577
-            if (array[i].good_id == 0) {
578
-              this.$message.error('规格名称不能为空')
579
-              return
557
+            const array = this.recordInfo.recordData
558
+            for (let i = 0; i < array.length; i++) {
559
+              if (array[i].good_type_id == 0) {
560
+                this.$message.error('商品类型不能为空')
561
+                return
562
+              }
563
+              if (array[i].good_id == 0) {
564
+                this.$message.error('规格名称不能为空')
565
+                return
566
+              }
580 567
             }
581
-          }
582 568
 
583
-          const params = {
584
-            'stockIn': this.recordInfo.recordData
585
-          }
586
-          postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
587
-            if (response.data.state == 0) {
588
-              this.$message.error(response.data.msg)
589
-              return false
590
-            } else {
591
-              this.$message.success('入库成功')
592
-
593
-              this.$router.back(-1)
569
+            const params = {
570
+              'stockIn': this.recordInfo.recordData
594 571
             }
595 572
             postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
596 573
               if (response.data.state == 0) {
@@ -638,38 +615,11 @@
638 615
       tempObj['remark'] = ''
639 616
       tempObj['dealer'] = ''
640 617
       tempObj['manufacturer'] = ''
618
+
641 619
       this.recordInfo.recordData.push(tempObj)
620
+      this.GetConfigInfo()
621
+      this.propForm.goodUnit = this.$store.getters.good_unit
642 622
     }
643
-  }
644
-  ,
645
-  created()
646
-  {
647
-    var nowDate = new Date()
648
-    var nowYear = nowDate.getFullYear()
649
-    var nowMonth = nowDate.getMonth() + 1
650
-    var nowDay = nowDate.getDate()
651
-    this.warehousing_time =
652
-      nowYear +
653
-      '-' +
654
-      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
655
-      '-' +
656
-      (nowDay < 10 ? '0' + nowDay : nowDay)
657
-    const tempObj = {}
658
-    tempObj['good_type_id'] = 0
659
-    tempObj['good_id'] = 0
660
-    tempObj['number'] = ''
661
-    tempObj['product_date'] = ''
662
-    tempObj['expiry_date'] = ''
663
-    tempObj['warehousing_count'] = ''
664
-    tempObj['price'] = ''
665
-    tempObj['remark'] = ''
666
-    tempObj['dealer'] = ''
667
-    tempObj['manufacturer'] = ''
668
-
669
-    this.recordInfo.recordData.push(tempObj)
670
-    this.GetConfigInfo()
671
-    this.propForm.goodUnit = this.$store.getters.good_unit
672
-  }
673 623
 
674 624
   }
675 625
 </script>
@@ -710,4 +660,3 @@
710 660
   }
711 661
 
712 662
 </style>
713
-s