Bläddra i källkod

添加修改供货商

shish 2 år sedan
förälder
incheckning
1ca89fbf9e
1 ändrade filer med 56 tillägg och 7 borttagningar
  1. 56 7
      ghsApp/src/pagesPurchase/suppAdd.vue

+ 56 - 7
ghsApp/src/pagesPurchase/suppAdd.vue

@@ -1,10 +1,11 @@
 <template>
 <template>
   <div class="app-content">
   <div class="app-content">
       <form @submit="formSubmit">
       <form @submit="formSubmit">
+
         <div class="module-com input-line-wrap">
         <div class="module-com input-line-wrap">
           <tui-list-cell class="line-cell" :hover="false">
           <tui-list-cell class="line-cell" :hover="false">
             <div class="tui-title required">名称</div>
             <div class="tui-title required">名称</div>
-            <input v-model="form.name" class="tui-input" placeholder="请填写名称" maxlength="50" type="text" name="username" />
+            <input v-model="form.name" class="tui-input" placeholder="请填写名称" maxlength="50" type="text" name="username" @input="searchGhs" />
           </tui-list-cell>
           </tui-list-cell>
 
 
           <tui-list-cell class="line-cell" :hover="false">
           <tui-list-cell class="line-cell" :hover="false">
@@ -20,23 +21,32 @@
               </label>
               </label>
             </radio-group>
             </radio-group>
           </tui-list-cell>
           </tui-list-cell>
+          <view style="margin-top:20upx;padding:0 30upx 0 30upx;">选本地,录采购单,没有打包费、运费填写入口。选上游时,有打包费、运费的填写入口。</view>
+
+          <view style="margin-top:50upx;padding-left:50upx;font-size:38upx;margin-bottom:90upx;" v-if="!$util.isEmpty(supplierList)">
+            <view v-for="(item, index) in supplierList" :key="index" @click="goToCg(item)" style="margin-bottom:30upx;">{{ item.name }}</view>
+          </view>
 
 
-        <view style="margin-top:20upx;padding:0 30upx 0 30upx;">选本地,录采购单,没有打包费、运费填写入口。选上游时,有打包费、运费的填写入口。</view>
         </div>
         </div>
-        <div class="confirm-btn">
+
+        <view class="app-footer">
+          <button class="admin-button-com big default" @click="goBack()">取消</button>
           <button class="admin-button-com big blue" formType="submit">确认</button>
           <button class="admin-button-com big blue" formType="submit">确认</button>
-        </div>
+        </view>
+
       </form>
       </form>
+
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import TuiListCell from "@/components/plugin/list-cell";
 import TuiListCell from "@/components/plugin/list-cell";
-import { ghsAdd } from "@/api/ghs"
+import { ghsAdd,getList } from "@/api/ghs"
 const form = require("@/utils/formValidation.js");
 const form = require("@/utils/formValidation.js");
+import ModalModule from "@/components/plugin/modal";
 export default {
 export default {
   components: {
   components: {
-    TuiListCell,
+    TuiListCell,ModalModule
   },
   },
   data() {
   data() {
     return {
     return {
@@ -44,10 +54,22 @@ export default {
         name: '',
         name: '',
         location:0,
         location:0,
         mobile:''
         mobile:''
-      }
+      },
+      supplierList:[]
     }
     }
   },
   },
   methods: {
   methods: {
+    goToCg(item){
+      this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name+'&location='+item.location,type:2})
+    },
+    searchGhs(e){
+      let that = this
+      let name = e.target.value ? e.target.value : ''
+      this.showGhsModel = true
+      getList({ pageSize:20, name:name }).then(res => {
+        that.supplierList = res.data.list ? res.data.list : []
+      })
+    },
 		locationChange(e){
 		locationChange(e){
 			this.form.location = e.detail.value
 			this.form.location = e.detail.value
 		},
 		},
@@ -119,4 +141,31 @@ export default {
     width: 100%;
     width: 100%;
   }
   }
 }
 }
+.select-cmd_bx {
+		.num_bx {
+			margin-top:30upx;
+			margin-bottom:50upx;
+			margin-left:80upx;
+			view{
+				height: 80upx;
+				font-size: 28upx;
+			}
+			input {
+				height: 70upx;
+				border: 1upx solid #dddddd;
+				border-radius: 4upx;
+				text-align: left;
+				margin-right: 24upx;
+				font-size: 35upx;
+				width:300upx;
+			}
+		}
+	}
+  .app-footer {
+  justify-content: space-evenly;
+  z-index: 9999;
+  .admin-button-com {
+    width: 46%;
+  }
+}
 </style>
 </style>