Ver Fonte

Merge branch 'master' of http://git.cc-lotus.info/news-zhwl/cms-zhwl

guhongwei há 4 anos atrás
pai
commit
ae241d04e6

+ 9 - 0
src/store/index.js

@@ -17,6 +17,12 @@ import treaty from '@f/store/client/treaty';
 import project from '@f/store/client/project';
 import route from '@f/store/client/route';
 import mode from '@f/store/client/mode';
+//拆分
+import split from '@f/store/order/split';
+//收入
+import inBill from '@f/store/order/inBill';
+//支出
+import outBill from '@f/store/order/outBill';
 
 import car from '@f/store/car/car';
 import daily from '@f/store/car/daily';
@@ -52,5 +58,8 @@ export default new Vuex.Store({
     schedule,
     notice,
     transport,
+    split,
+    inBill,
+    outBill,
   },
 });

+ 7 - 13
src/views/order/goods.vue

@@ -2,6 +2,9 @@
   <div id="goods">
     <el-row>
       <el-col :span="24" class="container">
+        <el-col :span="24" class="search">
+          <search-bar :nameList="nameList"></search-bar>
+        </el-col>
         <el-col :span="24" class="info">
           <el-row :gutter="20">
             <el-col :span="12" class="card" v-for="(item, index) in list" :key="index">
@@ -21,7 +24,7 @@
                   <el-table-column prop="remark" label="备注"></el-table-column>
                   <el-table-column label="操作">
                     <template slot-scope="scope">
-                      <el-button size="mini" @click="splice(index, scope.row)">编辑</el-button>
+                      <el-button size="mini" @click="splice(index, scope.row)">拆分</el-button>
                     </template>
                   </el-table-column>
                 </el-table>
@@ -120,13 +123,14 @@
 const { mapActions: client } = createNamespacedHelpers('client');
 const { mapActions: order } = createNamespacedHelpers('order');
 import { mapState, createNamespacedHelpers } from 'vuex';
+import searchBar from './index-parts/search-bar.vue';
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
   },
   name: 'goods',
   props: {},
-  components: {},
+  components: { searchBar },
   data: function() {
     return {
       fields: [
@@ -142,16 +146,7 @@ export default {
       form: {},
       orderForm: {},
       dialog: false,
-      tableData: [
-        // {
-        //   ordernum: '111111',
-        //   splitnum: '111_222',
-        //   goods: '好吃的',
-        //   number: '20',
-        //   weight: '20',
-        //   volume: '8',
-        // },
-      ],
+      tableData: [],
       //拆分订单列表
       splitList: [],
       //合同列表
@@ -300,7 +295,6 @@ export default {
       // console.log(splitList);
       let newList = [];
       newList.push(splitList[0]);
-      newList.push();
       for (let item of data) {
         newList.push(item);
       }

+ 5 - 3
src/views/order/in.vue

@@ -48,6 +48,7 @@
 const { mapActions: client } = createNamespacedHelpers('client');
 const { mapActions: order } = createNamespacedHelpers('order');
 const { mapActions: user } = createNamespacedHelpers('user');
+const { mapActions: inBill } = createNamespacedHelpers('inBill');
 import { mapState, createNamespacedHelpers } from 'vuex';
 import inDetail from './inDetail.vue';
 export default {
@@ -108,11 +109,11 @@ export default {
   methods: {
     ...client({ clientQuery: 'query' }),
     ...user({ userQuery: 'query' }),
+    ...inBill(['inBill']),
     ...order(['query', 'create', 'update', 'delete', 'fetch']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
       //查订单
       const res = await this.query({ skip, limit, ...info });
-      // console.log(res.data);
       if (this.$checkRes(res)) {
         const { data, total } = res;
         this.$set(this, `list`, data);
@@ -167,8 +168,9 @@ export default {
     async toSave(data) {
       console.log(data);
       if (data.id) {
-        const res = await this.update(data);
-        if (this.$checkRes(res, '修改成功', res.errmsg || '修改失败')) {
+        const res = await this.inBill(data);
+        console.log(res);
+        if (this.$checkRes(res, '保存成功', res.errmsg || '保存失败')) {
           this.search();
           this.flag = false;
         }

+ 3 - 5
src/views/order/inDetail.vue

@@ -224,10 +224,9 @@ export default {
     await this.search();
     await this.searchTree();
     await this.isTreaty();
-    // await this.assign();
-    // this.ifMode();
-    await this.computRate();
-    console.log(this.detailForm);
+    if (this.detailForm.goods[0].sq_ys) {
+      await this.computRate();
+    }
   },
   methods: {
     //查合同
@@ -451,7 +450,6 @@ export default {
     routeChange(data, type) {
       this.wayValue = data;
       this.searchWay();
-      console.log(data);
       if (type) return;
       for (let item of this.detailForm.goods) {
         item.mode = '';

+ 2 - 2
src/views/order/out.vue

@@ -225,7 +225,7 @@ export default {
         this.$set(this, `nameList`, data);
       }
       //查询其他收费项
-      const res2 = await this.tree('sr');
+      const res2 = await this.tree('zc');
       if (res2) {
         this.$set(this, `costList`, res2[0].children);
       }
@@ -249,7 +249,7 @@ export default {
       }
       // this.detailForm.out_bill.push({ taxes: '1', item: '保费' });
       //????总是显示最后一个
-      this.detailForm.out_bill.push({ taxes: 1, item: '保費' });
+      this.detailForm.out_bill.push({ taxes: 1 });
     },
     //删除选项卡
     removeTab(targetName) {