Kaynağa Gözat

采购记录优化

shish 1 yıl önce
ebeveyn
işleme
4bee3d877a

+ 7 - 0
ghs/src/service/purchase-order/index.js

@@ -2,6 +2,13 @@ import { BaseService, Service } from '@/cool';
 @Service('purchase-order')
 @Service('purchase-order')
 export class PurchaseOrderService extends BaseService {
 export class PurchaseOrderService extends BaseService {
 
 
+	assignSeat(data){
+		return this.request({
+			url: '/assign-seat',
+			params: data
+		});		
+	}
+
 	getOrderList(data){
 	getOrderList(data){
 		return this.request({
 		return this.request({
 			url: '/list',
 			url: '/list',

+ 133 - 11
ghs/src/views/in/components/order-detail.vue

@@ -1,18 +1,28 @@
 <template>
 <template>
 	<div class="order-detail">
 	<div class="order-detail">
-		<el-drawer :visible.sync="showOrderDetail" size="1000px" :before-close="closeFn" custom-class="order-draw-wrap" direction="ltr" >
-			<div class="order-manage-wrap" v-if="data!=''">
+		<el-drawer :visible.sync="showDetail" size="1000px" :before-close="closeFn" custom-class="order-draw-wrap" direction="ltr" >
+			<div class="order-manage-wrap" v-if="!$util.isEmpty(detailInfo)">
 
 
 				<div class="card-wrap" style="margin-top:0;">
 				<div class="card-wrap" style="margin-top:0;">
-					<div class="card-tit">花材信息</div>
+					<div class="card-tit">
+						花材信息按 Esc 关闭窗口)
+						<el-button type="primary" style="margin-left:80px;" @click="assignOrder()">刷新货位</el-button>
+					</div>
 					<div class="card-body">
 					<div class="card-body">
-						<el-table :data="data[0].itemInfo">
+						<el-table :data="detailInfo.itemInfo">
 							<el-table-column label="花材图片">
 							<el-table-column label="花材图片">
 								<template slot-scope="scope">
 								<template slot-scope="scope">
-									<cl-avatar shape="square" :size="30" :src="scope.row.cover" ></cl-avatar>
+									<el-popover placement="right" width="200" trigger="hover">
+										<div style="width:200px;height:200px;">
+											<img style="width:100%;height:100%;object-fit: cover;" :src="scope.row.bigCover" />
+										</div>
+										<div style="width:30px;" slot="reference">
+											<img style="width:100%;height:100%;object-fit: cover;border-radius:5px;" :src="scope.row.cover" />
+										</div>
+									</el-popover>
 								</template>
 								</template>
 							</el-table-column>
 							</el-table-column>
-							<el-table-column property="name" label="花材名称"></el-table-column>
+							<el-table-column property="name" label="花材名称" width="200"></el-table-column>
 							<el-table-column property="bigPrice" label="单价"></el-table-column>
 							<el-table-column property="bigPrice" label="单价"></el-table-column>
 
 
 							<el-table-column label="数量">
 							<el-table-column label="数量">
@@ -26,10 +36,97 @@
 									<span>¥{{ scope.row.totalPrice }}</span>
 									<span>¥{{ scope.row.totalPrice }}</span>
 								</template>
 								</template>
 							</el-table-column>
 							</el-table-column>
+							<el-table-column label="分配货位" width="300">
+								<template slot-scope="scope">
+									<div v-if="Number(scope.row.noSeatNum)>0"> 无货位 {{ scope.row.noSeatNum }} </div>
+
+									<div v-if="!$util.isEmpty(scope.row.sendList)" style="margin-bottom:10upx;font-size:30upx;">
+										<div v-for="(send, sendIndex) in scope.row.sendList" style="margin-bottom:7upx;">
+											{{ send.customName }}({{ send.seatSn }})  数量 {{ send.num }}
+											<span style="margin-left:20upx;">{{ send.status == 0 ?'待上架':send.status == 1?'已上架':'已取消' }}</span>
+										</div>
+									</div>
+
+								</template>
+							</el-table-column>
 						</el-table>
 						</el-table>
 					</div>
 					</div>
 				</div>
 				</div>
 
 
+				<div style="margin-left:180px;">
+					<template v-if="detailInfo.location == 0">
+						<div class="accounts-list">
+							运费支付
+							<div class="accounts-center" style="font-weight:bold;color:black;">{{detailInfo.yfPayWay==1?'寄付':'到付'}}</div>
+						</div>
+						<div class="accounts-list">
+							打包费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.packingCharge?parseFloat(detailInfo.packingCharge):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							短途运费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.shortCharge?parseFloat(detailInfo.shortCharge):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							长途运费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.longCharge?parseFloat(detailInfo.longCharge):0 }}</div>
+						</div>
+					</template>
+					<div class="accounts-list">
+						总金额
+						<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.prePrice ? parseFloat(detailInfo.prePrice) : 0 }}</div>
+					</div>
+					<div class="accounts-list" v-if="detailInfo.refundPrice > 0">
+						退款金额
+						<div class="accounts-center" style="font-weight:bold;color:black;">-¥{{ detailInfo.tkPrice ? parseFloat(detailInfo.tkPrice) : 0 }}</div>
+					</div>
+					<div class="accounts-list">
+						减免
+						<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.discountAmount ? parseFloat(detailInfo.discountAmount) : 0 }}</div>
+					</div>
+					<div class="accounts-list">
+						实际金额
+						<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.realPrice ? parseFloat(detailInfo.realPrice) : 0 }}</div>
+					</div>
+					<template v-if="detailInfo.location == 0">
+						<div class="accounts-list" v-if="detailInfo.yfPayWay==2">
+							短途运费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.shortCharge?parseFloat(detailInfo.shortCharge):0 }}</div>
+						</div>
+						<div class="accounts-list" v-if="detailInfo.yfPayWay==2">
+							长途运费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.longCharge?parseFloat(detailInfo.longCharge):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							提货费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.pickCharge?parseFloat(detailInfo.pickCharge):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							本地运费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.localCharge?parseFloat(detailInfo.localCharge):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							合计费用
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.totalFreight?parseFloat(detailInfo.totalFreight):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							合计成本
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.totalCgCost?parseFloat(detailInfo.totalCgCost):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							总重量
+							<div class="accounts-center" style="font-weight:bold;color:black;">{{ detailInfo.totalWeight?parseFloat(detailInfo.totalWeight):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							每公斤运费
+							<div class="accounts-center" style="font-weight:bold;color:black;">¥{{ detailInfo.avgKgWeight?parseFloat(detailInfo.avgKgWeight):0 }}</div>
+						</div>
+						<div class="accounts-list">
+							物流费用
+							<div class="accounts-center" style="font-weight:bold;color:black;">{{detailInfo.isCost==0?'不算成本':'算成本'}}</div>
+						</div>
+					</template>
+	      		</div>
 			</div>
 			</div>
 		</el-drawer>
 		</el-drawer>
 	</div>
 	</div>
@@ -45,19 +142,44 @@ export default {
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
-			showOrderDetail: false,
-			data: []
+			showDetail: false,
+			selectJobType: "order_change",
+			autoLoad: false,
+			stepActive: 0,
+			form: {
+				name: ""
+			},
+			detailInfo: {},
+			loading: false,
+			printItemId:0,
+			printType:0,
+			printLabelShow:false,
+			printNum:'',
+			wcPrintNum:1,
+			entryTime:'',
+			T:null,
+			orderSn:'',
+			salt:'',
+			showSeat:1,
+			title:'',
+			imageUrl:''
 		};
 		};
 	},
 	},
 	methods: {
 	methods: {
+		assignOrder(){
+			this.$service.purchaseOrder.assignSeat({id:this.detailInfo.id,salt:this.salt}).then(res=>{
+				this.init()
+				this.$message.success('刷新成功')
+			})
+		},
 		init() {
 		init() {
 			this.$service.purchaseOrder.detail({ orderSn: this.orderOperate.orderSn }).then(res => {
 			this.$service.purchaseOrder.detail({ orderSn: this.orderOperate.orderSn }).then(res => {
-				this.data = [res];
-				this.showOrderDetail = true;
+				this.detailInfo = res;
+				this.showDetail = true;
 			})
 			})
 		},
 		},
 		closeFn() {
 		closeFn() {
-			this.showOrderDetail = false;
+			this.showDetail = false;
 		}
 		}
 	}
 	}
 };
 };

+ 16 - 14
ghs/src/views/in/list.vue

@@ -454,61 +454,63 @@ export default {
                 prop: 'printNum',
                 prop: 'printNum',
                 label: '打印',
                 label: '打印',
                 align: 'center',
                 align: 'center',
-                width: 60
+                width: 50
               },
               },
               {
               {
                 prop: 'cgStaffName',
                 prop: 'cgStaffName',
                 label: '采购人',
                 label: '采购人',
                 align: 'center',
                 align: 'center',
-                width: 80
+                width: 80,
+                emptyText: '-'
               },
               },
               {
               {
-                prop: 'adminName',
-                label: '录单人',
+                prop: 'status',
+                label: '状态',
                 align: 'center',
                 align: 'center',
-                width: 80
+                width: 90
               },
               },
               {
               {
                 prop: 'itemList',
                 prop: 'itemList',
                 label: '花材',
                 label: '花材',
                 align: 'center',
                 align: 'center',
-                width: 170
+                width: 160
               },
               },
               {
               {
                 prop: 'itemNum',
                 prop: 'itemNum',
                 label: '数量',
                 label: '数量',
                 align: 'center',
                 align: 'center',
-                width: '70'
+                width: '60'
               },
               },
               {
               {
                 prop: 'seatSn',
                 prop: 'seatSn',
                 label: '货位',
                 label: '货位',
                 align: 'center',
                 align: 'center',
-                width: '80'
+                width: '70'
               },
               },
               {
               {
                 prop: 'prePrice',
                 prop: 'prePrice',
                 label: '总金额',
                 label: '总金额',
                 align: 'center',
                 align: 'center',
-                width: '90'
+                width: '80'
               },
               },
               {
               {
                 prop: 'tkPrice',
                 prop: 'tkPrice',
                 label: '退款金额',
                 label: '退款金额',
                 align: 'center',
                 align: 'center',
-                width: '90'
+                width: '80'
               },
               },
               {
               {
                 prop: 'actPrice',
                 prop: 'actPrice',
                 label: '实际金额',
                 label: '实际金额',
                 align: 'center',
                 align: 'center',
-                width: '90'
+                width: '80'
               },
               },
               {
               {
-                prop: 'status',
-                label: '状态',
+                prop: 'adminName',
+                label: '录单人',
                 align: 'center',
                 align: 'center',
-                width: 90
+                width: 80,
+                emptyText: '-'
               },
               },
               {
               {
                 prop: 'entryTime',
                 prop: 'entryTime',