lilei 3 년 전
부모
커밋
2c7da8643b
2개의 변경된 파일29개의 추가작업 그리고 11개의 파일을 삭제
  1. 27 9
      src/views/salesManagement/outboundOrder/detailModal.vue
  2. 2 2
      vue.config.js

+ 27 - 9
src/views/salesManagement/outboundOrder/detailModal.vue

@@ -29,22 +29,22 @@
               </a-col>
               <a-col span="12">
                 <a-form-model-item label="目的地">
-                  <a-input placeholder="请输入目的地" v-model.trim="form.customerAddress"></a-input>
+                  <a-input placeholder="请输入目的地(最多100字符)" :maxLength="100" v-model.trim="form.customerAddress"></a-input>
                 </a-form-model-item>
               </a-col>
               <a-col span="12">
                 <a-form-model-item label="收货人" prop="customerCacateName">
-                  <a-input placeholder="请输入收货人" v-model.trim="form.customerCacateName"></a-input>
+                  <a-input placeholder="请输入收货人(最多50字符)" :maxLength="50" v-model.trim="form.customerCacateName"></a-input>
                 </a-form-model-item>
               </a-col>
               <a-col span="12">
                 <a-form-model-item label="电话" prop="customerCacatePhone">
-                  <a-input placeholder="请输入电话" v-model.trim="form.customerCacatePhone"></a-input>
+                  <a-input placeholder="请输入电话" :maxLength="11" v-model.trim="form.customerCacatePhone"></a-input>
                 </a-form-model-item>
               </a-col>
               <a-col span="24">
                 <a-form-model-item label="详细地址" prop="customerAddressDetail" :label-col="{span:3}" :wrapper-col="{span:19}">
-                  <a-textarea placeholder="请输入详细地址" v-model.trim="form.customerAddressDetail"></a-textarea>
+                  <a-textarea placeholder="请输入详细地址(最多300字符)" :maxLength="300" v-model.trim="form.customerAddressDetail"></a-textarea>
                 </a-form-model-item>
               </a-col>
               <a-col span="12">
@@ -69,7 +69,8 @@
               </a-col>
               <a-col span="12">
                 <a-form-model-item label="运费合计">
-                  <a-input disabled placeholder="请输入运费合计" v-model.trim="form.totalSendAmount"></a-input>
+                  <!-- <a-input disabled placeholder="请输入运费合计" v-model.trim="form.totalSendAmount"></a-input> -->
+                  {{ form.totalSendAmount||'--' }}
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -79,7 +80,7 @@
           <a-table :columns="columns" :pagination="false" :scroll="{ y: 200 }" :data-source="tableData" bordered>
             <!-- 物品名称 -->
             <template slot="goodName" slot-scope="text, record">
-              <a-select v-model="record.goodsName" style="width: 100%">
+              <a-select v-model="record.goodsName" placeholder="请选择物品" style="width: 100%">
                 <a-select-option value="易损件">
                   易损件
                 </a-select-option>
@@ -153,8 +154,8 @@
               </a-button>
             </template>
           </a-table>
-          <div style="padding: 5px; border:1px solid #eee;border-radius:0 0 10px;border-top: 0;">
-            <a-button @click="addItem()" type="link" block>+新增发货明细</a-button>
+          <div style="padding: 5px; border:1px solid #eee;border-radius:0 0 10px;border-top: 0;text-align:center;">
+            <a-button @click="addItem()" type="link">+新增发货明细</a-button>
           </div>
         </div>
       </div>
@@ -290,7 +291,7 @@ export default {
       const len = this.tableData.length
       this.tableData.push({
         'no': len + 1,
-        'goodsName': '',
+        'goodsName': undefined,
         'goodsQty': '',
         'goodsVolume': '',
         'goodsWeight': '',
@@ -302,6 +303,15 @@ export default {
         'totalAmount': ''
       })
     },
+    // 校验物品单
+    vaildGood (key) {
+      const ret = []
+      this.tableData.map(item => {
+        ret.push(!!item[key])
+      })
+      console.log(ret)
+      return ret
+    },
     // 确定
     handleCommonOk () {
       const _this = this
@@ -316,6 +326,14 @@ export default {
             _this.$message.info('请新增发货明细!')
             return false
           }
+          if (_this.vaildGood('goodsName').indexOf(false) >= 0) {
+            _this.$message.info('请选择物品!')
+            return false
+          }
+          if (_this.vaildGood('totalAmount').indexOf(false) >= 0) {
+            _this.$message.info('请输入费用!')
+            return false
+          }
           console.log(_this.form)
           sendBillInsert(_this.form).then(res => {
             if (res.status == 200) {

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.16.102/ocs-admin',
+        // target: 'http://192.168.16.102/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  Á·Ï°
-        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
+        target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         ws: false,
         changeOrigin: true,
         pathRewrite: {