shish 2 년 전
부모
커밋
0f28b0feda
2개의 변경된 파일80개의 추가작업 그리고 18개의 파일을 삭제
  1. 15 0
      ghs/src/service/order/index.js
  2. 65 18
      ghs/src/views/order/list.vue

+ 15 - 0
ghs/src/service/order/index.js

@@ -5,6 +5,21 @@ import { baseUrl } from '@/config/env';
 @Service('order')
 @Service('order')
 export class OrderService extends BaseService {
 export class OrderService extends BaseService {
 
 
+	fh(data) {
+		return this.request({
+			url: '/fh',
+			method: 'POST',
+			data: data
+		});
+	}
+
+	modifyClearSign(data) {
+		return this.request({
+			url: '/modify-clear-sign',
+			params: data
+		});
+	}
+
 	modifyRemark(data) {
 	modifyRemark(data) {
 		return this.request({
 		return this.request({
 			url: '/modify-remark',
 			url: '/modify-remark',

+ 65 - 18
ghs/src/views/order/list.vue

@@ -26,6 +26,18 @@
         </div>
         </div>
       </template>
       </template>
 
 
+      <template #table-column-clearSign="{scope}">
+        <div v-if="scope.row.clearSign == 0">
+          <el-popconfirm title="确认已结算?" @confirm="updateClearSign(scope.row)">
+            <i class="el-icon-edit" style="color:#409eff;font-size:17px;cursor:pointer;" slot="reference"></i>
+          </el-popconfirm>
+        </div>
+        <div v-else>
+        <i class="el-icon-success" style="color:green;font-size:17px;"></i>
+        </div>
+      </template>
+      
+
       <template #table-column-debt="{scope}">
       <template #table-column-debt="{scope}">
         <span style="color:red;font-weight:bold;font-size:13px;" v-if="scope.row.debt == 1">赊</span>
         <span style="color:red;font-weight:bold;font-size:13px;" v-if="scope.row.debt == 1">赊</span>
         <span v-else>-</span>
         <span v-else>-</span>
@@ -89,20 +101,32 @@
         <el-button size="small" v-else>下载</el-button>
         <el-button size="small" v-else>下载</el-button>
 
 
         <el-button @click.stop="allDown(scope.row)" size="small" type="primary" v-if="scope.row.status!=5 && scope.row.status!=1 && scope.row.sameTimeIdsNum>1">全下载</el-button>
         <el-button @click.stop="allDown(scope.row)" size="small" type="primary" v-if="scope.row.status!=5 && scope.row.status!=1 && scope.row.sameTimeIdsNum>1">全下载</el-button>
-        <el-button size="small" v-else>全部下载</el-button>
+        <el-button size="small" v-else>全下载</el-button>
+
+        <el-popconfirm title="确认已发货?" @confirm="confirmSend(scope.row)" v-if="scope.row.status!=5 && scope.row.status==2" style="margin-left:10px;">
+          <el-button size="small" type="primary" slot="reference">发货</el-button>
+        </el-popconfirm>
+
+        <el-button size="small" v-else>发货</el-button>
+
       </template>
       </template>
 
 
-      <template #slot-order-book="{scope}">
+      <template #slot-search-option="{scope}">
         <el-radio-group v-model="book" @change="changeBook" style="margin-right:20px;padding-top:6px;margin-left:20px;">
         <el-radio-group v-model="book" @change="changeBook" style="margin-right:20px;padding-top:6px;margin-left:20px;">
-          <el-radio label="-1">全部订单</el-radio>
+          <el-radio label="-1">全部</el-radio>
           <el-radio label="0">普通订单</el-radio>
           <el-radio label="0">普通订单</el-radio>
           <el-radio label="1">预订单</el-radio>
           <el-radio label="1">预订单</el-radio>
         </el-radio-group>
         </el-radio-group>
+        <el-radio-group v-model="clearSign" @change="changeClearSign" style="margin-right:20px;padding-top:6px;margin-left:20px;">
+        <el-radio label="-1">全部</el-radio>
+          <el-radio label="0">待结</el-radio>
+          <el-radio label="1">已结</el-radio>
+        </el-radio-group>
       </template>
       </template>
 
 
       <template #slot-billing>
       <template #slot-billing>
-				<el-button type="primary" size="mini" style="margin-left:50px;" @click="billing()">开单</el-button>
-        <el-button type="primary" size="mini" style="margin-left:50px;" @click="newCg()">新增采购</el-button>
+				<el-button type="primary" size="mini" style="margin-left:20px;" @click="billing()">开单</el-button>
+        <el-button type="primary" size="mini" style="margin-left:20px;" @click="newCg()">新增采购</el-button>
 			</template>
 			</template>
 
 
     </x-crud>
     </x-crud>
@@ -208,7 +232,8 @@ export default {
       ],
       ],
       optionData: {},
       optionData: {},
       orderData:'',
       orderData:'',
-      book:"-1"
+      book:"-1",
+      clearSign:"-1"
     };
     };
   },
   },
   created() {
   created() {
@@ -228,6 +253,18 @@ export default {
 		}
 		}
 	},
 	},
   methods: {
   methods: {
+    confirmSend(info){
+      this.$service.order.fh({id:info.id,fhType:0}).then(data => {
+        this.$notify({ title: '操作成功', message: '', type: 'success'})
+        this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign })
+      })
+    },
+    updateClearSign(info){
+      this.$service.order.modifyClearSign({id:info.id}).then(data => {
+        this.$notify({ title: '操作成功', message: '', type: 'success'})
+        this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign })
+      })
+    },
 		newCg(){
 		newCg(){
 			let query = {}
 			let query = {}
 			this.$router.push({path:'/in/add',query})
 			this.$router.push({path:'/in/add',query})
@@ -236,9 +273,13 @@ export default {
 			let query = {}
 			let query = {}
 			this.$router.push({path:'/order/add',query})
 			this.$router.push({path:'/order/add',query})
     },
     },
+    changeClearSign(e){
+      this.clearSign = e
+      this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign });
+    },
     changeBook(e){
     changeBook(e){
       this.book = e
       this.book = e
-      this.app.refresh({ status: this.tabIndex,book:this.book });
+      this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign });
     },
     },
     todays(type) {
     todays(type) {
       var myDate = new Date();
       var myDate = new Date();
@@ -289,7 +330,7 @@ export default {
         hiprintTemplate.print(printData)
         hiprintTemplate.print(printData)
 
 
         this.$service.order.addPrintNum({id:info.id}).then(data => {
         this.$service.order.addPrintNum({id:info.id}).then(data => {
-          this.app.refresh({ status: this.tabIndex,book:this.book })
+          this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign })
         })
         })
 
 
 			});
 			});
@@ -332,7 +373,7 @@ export default {
       });
       });
     },
     },
     handleClick(tab, e) {
     handleClick(tab, e) {
-      this.app.refresh({ status: this.tabIndex,book:this.book });
+      this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign });
     },
     },
     onLoad({ ctx, app }) {
     onLoad({ ctx, app }) {
       this.app = app;
       this.app = app;
@@ -390,6 +431,18 @@ export default {
                 align: 'center',
                 align: 'center',
                 width: '80'
                 width: '80'
               },
               },
+              {
+                prop: 'status',
+                label: '状态',
+                align: 'center',
+                width: 70
+              },
+              {
+                prop: 'clearSign',
+                label: '结算',
+                align: 'center',
+                width: 50
+              },
               {
               {
                 prop: 'book',
                 prop: 'book',
                 label: '预订',
                 label: '预订',
@@ -432,12 +485,6 @@ export default {
                 label: '开单时间',
                 label: '开单时间',
                 align: 'center',
                 align: 'center',
                 width: 90
                 width: 90
-              },
-              {
-                prop: 'status',
-                label: '状态',
-                align: 'center',
-                width: 70
               }
               }
             ],
             ],
             on: {
             on: {
@@ -456,7 +503,7 @@ export default {
             op: {
             op: {
               visible: true,
               visible: true,
               props: {
               props: {
-                width: 430,
+                width: 455,
                 align: 'center',
                 align: 'center',
                 fixed: 'right',
                 fixed: 'right',
                 label: '操作'
                 label: '操作'
@@ -474,7 +521,7 @@ export default {
           })
           })
           .set('layout', [
           .set('layout', [
             ['slot-tabs'],
             ['slot-tabs'],
-            ['slot-order-book','search-key','slot-billing'],
+            ['slot-search-option','search-key','slot-billing'],
             ['data-table'],
             ['data-table'],
             ['flex1', 'pagination']
             ['flex1', 'pagination']
           ])
           ])
@@ -487,7 +534,7 @@ export default {
             this.tabsData[4].val = asset.shop.finishOrder||0;
             this.tabsData[4].val = asset.shop.finishOrder||0;
           })
           })
           .done();
           .done();
-          app.refresh({ status: this.tabIndex,book:this.book })
+          app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign })
     },
     },
     onSongSuccess() {
     onSongSuccess() {