shish 2 vuotta sitten
vanhempi
commit
d7367cea81

+ 3 - 3
ghs/src/mock/userInfo.js

@@ -159,8 +159,7 @@ let menu = {
         {id: '301',parentId: 3,name: '订单列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
         {id: '301',parentId: 3,name: '订单列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
 		{id: '303',parentId: 3,name: '预订汇总',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/book',viewPath: 'views/order/book.vue',keepAlive: 1},
 		{id: '303',parentId: 3,name: '预订汇总',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/book',viewPath: 'views/order/book.vue',keepAlive: 1},
         {id: '302',parentId: 3,name: '开单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/add',viewPath: 'views/order/add.vue',keepAlive: 1},
         {id: '302',parentId: 3,name: '开单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/add',viewPath: 'views/order/add.vue',keepAlive: 1},
-		{id: '304',parentId: 3,name: '开预订单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/addBook',viewPath: 'views/order/addBook.vue',keepAlive: 1},
-		{id: '306',parentId: 3,name: '提交订单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/confirm',viewPath: 'views/order/confirm.vue',keepAlive: 1},
+		{id: '306',parentId: 3,name: '确认订单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/confirm',viewPath: 'views/order/confirm.vue',keepAlive: 1},
 
 
 		{id: '15',parentId: null,name: '供货',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
 		{id: '15',parentId: null,name: '供货',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
 		{id: '1505',parentId: 15,name: '商家列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
 		{id: '1505',parentId: 15,name: '商家列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
@@ -171,7 +170,8 @@ let menu = {
 
 
 		{id: '1400',parentId: null,name: '采购',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/in/list',viewPath: 'views/in/list.vue',keepAlive: 1},
 		{id: '1400',parentId: null,name: '采购',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/in/list',viewPath: 'views/in/list.vue',keepAlive: 1},
 		{id: '1405',parentId: 1400,name: '采购记录',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/list',viewPath: 'views/in/list.vue',keepAlive: 1},
 		{id: '1405',parentId: 1400,name: '采购记录',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/list',viewPath: 'views/in/list.vue',keepAlive: 1},
-		{id: '1415',parentId: 1400,name: '新增采购',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/add',viewPath: 'views/in/add.vue',keepAlive: 1},
+		{id: '1415',parentId: 1400,name: '采购',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/add',viewPath: 'views/in/add.vue',keepAlive: 1},
+		{id: '1425',parentId: 1400,name: '确认采购',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/confirm',viewPath: 'views/in/confirm.vue',keepAlive: 1},
 		{id: '1420',parentId: 1400,name: '改价入库',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/change',viewPath: 'views/in/change.vue',keepAlive: 1},
 		{id: '1420',parentId: 1400,name: '改价入库',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/change',viewPath: 'views/in/change.vue',keepAlive: 1},
 
 
 		{id: '4',parentId: null,name: '花材',type: 0,icon: 'iconshangpinguanli',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
 		{id: '4',parentId: null,name: '花材',type: 0,icon: 'iconshangpinguanli',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},

+ 1 - 1
ghs/src/views/home.vue

@@ -100,7 +100,7 @@ export default {
 					url: '/order/add'
 					url: '/order/add'
 				},
 				},
 				{
 				{
-					name: '新增采购',
+					name: '采购',
 					icon: 'icondingdanguanli',
 					icon: 'icondingdanguanli',
 					url: '/in/add'
 					url: '/in/add'
 				},
 				},

+ 19 - 75
ghs/src/views/in/add.vue

@@ -16,38 +16,23 @@
 				{{ scope.row.debtAmount?parseFloat(scope.row.debtAmount):0 }}
 				{{ scope.row.debtAmount?parseFloat(scope.row.debtAmount):0 }}
 			</template>
 			</template>
 
 
-			<template #table-column-balance="{scope}">
-				<span style="cursor: pointer;" @click="goBalanceChange(scope.row)">{{ scope.row.balance }}</span>
-			</template>
-
-			<template #table-column-actDebt="{scope}">
-				<span v-if="Number(scope.row.debtAmount) > Number(scope.row.balance)" style="color:blue;font-weight:bold;cursor: pointer;" @click="goChange(scope.row)">
-					{{ parseFloat((Number(scope.row.debtAmount)-Number(scope.row.balance)).toFixed(2)) }}
-				</span>
-				<span v-else style="font-weight:bold;cursor: pointer;" @click="goChange(scope.row)">-</span>
+			<template #table-column-location="{scope}">
+				<span v-if="scope.row.location == 1">本地</span>
+				<span v-else style="color:blue;font-weight:bold;">上游</span>
 			</template>
 			</template>
+			
 
 
 			<template #table-column-buyAmount="{scope}">
 			<template #table-column-buyAmount="{scope}">
 				<span>{{ scope.row.buyAmount ? parseFloat(scope.row.buyAmount) : 0 }}</span>
 				<span>{{ scope.row.buyAmount ? parseFloat(scope.row.buyAmount) : 0 }}</span>
 			</template>
 			</template>
 
 
 			<template #slot-column-option="{scope}">
 			<template #slot-column-option="{scope}">
-				<el-button size="small" type="primary" @click="kd(scope.row,1)">开预订单</el-button>
-				<el-button size="small" type="primary" @click="kd(scope.row,0)" style="margin-left:30px;">开单</el-button>
-			</template>
-
-			<template #table-column-recentExpend="{scope}">
-				<span v-if="scope.row.recentExpend == '0000-00-00 00:00:00'">没有下过单</span>
-				<span v-else>{{ scope.row.recentExpend ? scope.row.recentExpend.substr(0,11) : 0 }}</span>
-			</template>
-
-			<template #table-column-visitTime="{scope}">
-				<span>{{ scope.row.visitTime ? scope.row.visitTime.substr(0,11) : 0 }}</span>
+				<el-button size="small" type="primary" @click="goCg(scope.row)" style="margin-left:30px;">新增采购</el-button>
 			</template>
 			</template>
 
 
 
 
 			<template #slot-top-element>
 			<template #slot-top-element>
-				<el-input v-model="name" placeholder="搜索客户" size="big" style="width:400px;" ref="customSearchRef" @input="changeText()"></el-input>
+				<el-input v-model="name" placeholder="搜索供货商" size="big" style="width:400px;" ref="ghsSearchRef" @input="changeText()"></el-input>
 			</template>
 			</template>
 
 
 		</x-crud>
 		</x-crud>
@@ -90,7 +75,7 @@ export default {
 	mounted() {
 	mounted() {
 
 
 		this.$nextTick(() => {
 		this.$nextTick(() => {
-      		this.$refs.customSearchRef.focus()
+      		this.$refs.ghsSearchRef.focus()
     	})
     	})
 
 
 	},
 	},
@@ -99,28 +84,11 @@ export default {
 		changeText(){
 		changeText(){
 			this.app.refresh({ type: this.tabIndex,name:this.name })
 			this.app.refresh({ type: this.tabIndex,name:this.name })
 		},
 		},
-		goChange(data){
-			let query = {};
-			query.customId = data.id
-			query.endTime = ''
-			this.$router.push({ path: '/custom/pastAccountChange', query });
-		},
-		goBalanceChange(data){
-			let query = {};
-			query.customId = data.id
-			query.customName = data.name
-			this.$router.push({ path: '/member/custom-balance-list', query });
-		},
-		kd(info,book){
+		goCg(info){
 			let query = {}
 			let query = {}
-			query.customId = info.id
-			query.customName = info.name
-			query.book = book
-			if(book == 1){
-				this.$router.push({path:'/order/confirm',query})
-			}else{
-				this.$router.push({path:'/order/confirm',query})
-			}
+			query.ghsId = info.id
+			query.ghsName = info.name
+			this.$router.push({path:'/in/confirm',query})			
 		},
 		},
 		handleClick(tab, e) {
 		handleClick(tab, e) {
 			this.app.refresh({ type: this.tabIndex,name:this.name });
 			this.app.refresh({ type: this.tabIndex,name:this.name });
@@ -130,7 +98,7 @@ export default {
 			if (this.$route.query.type) {
 			if (this.$route.query.type) {
 				this.tabIndex = this.$route.query.type;
 				this.tabIndex = this.$route.query.type;
 			}
 			}
-			ctx.service(this.$service.custom)
+			ctx.service(this.$service.ghs)
 				.set('table', {
 				.set('table', {
 					columns: [
 					columns: [
 						{
 						{
@@ -139,6 +107,12 @@ export default {
 							align: 'center',
 							align: 'center',
 							width: 160
 							width: 160
 						},
 						},
+						{
+							prop: 'location',
+							label: '类型',
+							align: 'center',
+							width: 90
+						},
 						{
 						{
 							prop: 'mobile',
 							prop: 'mobile',
 							label: '手机号',
 							label: '手机号',
@@ -162,42 +136,12 @@ export default {
 							label: '余额',
 							label: '余额',
 							align: 'center',
 							align: 'center',
 							width: 90
 							width: 90
-						},
-						{
-							prop: 'actDebt',
-							label: '待结欠款',
-							align: 'center',
-							width: 100
-						},
-						{
-							prop: 'buyNum',
-							label: '消费次数',
-							align: 'center',
-							width: 90
-						},
-						{
-							prop: 'buyAmount',
-							label: '累计消费',
-							align: 'center',
-							width: 110
-						},
-						{
-							prop: 'recentExpend',
-							label: '最近下单',
-							align: 'center',
-							width: 120
-						},
-						{
-							prop: 'visitTime',
-							label: '最近访问',
-							align: 'center',
-							width: 120
 						}
 						}
 					],
 					],
 					op: {
 					op: {
 						visible: true,
 						visible: true,
 						props: {
 						props: {
-							width: 220,
+							width: 180,
 							align: 'center',
 							align: 'center',
 							fixed: 'left',
 							fixed: 'left',
 							label: '操作'
 							label: '操作'

+ 1 - 1
ghs/src/views/in/change.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<div>
 	<div>
         <div v-if="id == 0">
         <div v-if="id == 0">
-            <div style="width:35vw;margin:0 auto;margin-top:10px;text-align:center;font-size:25px;">请选择订单</div>
+            <div style="width:35vw;margin:0 auto;margin-top:90px;text-align:center;font-size:25px;">请选择订单</div>
         </div>
         </div>
         <div style="width:62vw;margin:0 auto;margin-top:10px;" v-else>
         <div style="width:62vw;margin:0 auto;margin-top:10px;" v-else>
             <el-table :data="flowersList" style="width:100%">
             <el-table :data="flowersList" style="width:100%">

+ 2 - 10
ghs/src/views/in/confirm.vue

@@ -1,14 +1,6 @@
 <template>
 <template>
-  <div v-if="form.ghsId == 0" style="text-align:left;margin-top:10vh;margin-left:10vw;">
-    <span style="font-size:20px;">供货商</span>
-    <el-select @change="selectGhsFn" v-model="selectGhsName" filterable remote reserve-keyword placeholder="输入拼音首字母,光标插入 Ctrl + C" clearable ref="ghsRef" @blur="getGhsBlur"
-				:remote-method="selectGhsInfo" :loading="loading" style="width:300px;margin-left:20px;" size="big">
-    				<el-option v-for="item in customInfoList" :key="item.id" :label="`${item.name}`" :value="item"></el-option>
-  				</el-select>
-
-          <el-button :type="location == 0?'primary':''" @click="location=0" size="medium" style="margin-left:50px;" round>上游</el-button>
-					<el-button :type="location == 1?'primary':''" @click="location=1" size="medium" round>本地</el-button>
-          <el-button type="primary" @click="addGhs()" style="margin-left:20px;" size="medium">添加</el-button>
+  <div v-if="form.ghsId == 0" style="width:35vw;margin:0 auto;margin-top:90px;text-align:center;font-size:25px;">
+    <span>请先选择供货商</span>
   </div>
   </div>
   <div class="app-list-content" v-else>
   <div class="app-list-content" v-else>
     <div class="left_box">
     <div class="left_box">

+ 7 - 8
ghs/src/views/order/confirm.vue

@@ -1,11 +1,14 @@
 <template>
 <template>
-  <div v-if="form.customId == 0" style="text-align:center;margin-top:30px;">
-    <span style="font-size:20px;">请先选择客户</span>
+  <div v-if="form.customId == 0" style="width:35vw;margin:0 auto;margin-top:90px;text-align:center;font-size:25px;">
+    <span>请先选择客户</span>
   </div>
   </div>
   <div class="app-list-content" v-else>
   <div class="app-list-content" v-else>
     <div class="left_box">
     <div class="left_box">
       <p class="tor">
       <p class="tor">
-        <span style="font-weight:bold;color:black;">客户:{{form.customName}}</span>
+        <span style="font-weight:bold;color:black;">
+          <span v-if="form.book == 1" style="color:blue;">【预订单】</span>
+          客户:{{form.customName}}
+        </span>
         <span>全屏:F11</span>
         <span>全屏:F11</span>
         <span>修改:回车</span>
         <span>修改:回车</span>
         <span>删除:Delete</span>
         <span>删除:Delete</span>
@@ -498,11 +501,7 @@ export default {
     },
     },
     comeBack(){
     comeBack(){
       let query = {}
       let query = {}
-      if(this.form.book == 1){
-        this.$router.push({path:'/order/addBook', query})
-      }else{
-        this.$router.push({path:'/order/add', query})
-      }
+      this.$router.push({path:'/order/add', query})    
     },
     },
     selectCustomFn(e){
     selectCustomFn(e){
       if(e.id && e.name){
       if(e.id && e.name){