Browse Source

2024-07-17修改 增加备注发货地址多选

luguang 3 months ago
parent
commit
8fa2469f87

+ 23 - 2
src/views/workshop/deliveryPlan/components/edit.vue

@@ -66,7 +66,7 @@
           </el-col>
           <el-col :lg="8">
             <el-form-item label="入库地点" prop="addressId">
-              <el-select v-model="editForm.addressId">
+              <el-select v-model="editForm.addressId"  multiple collapse-tags>
                 <el-option
                   v-for="item in addressOpt"
                   :key="item.val"
@@ -177,6 +177,17 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :lg="24">
+            <el-form-item label="备注" prop="">
+              <el-input
+                v-model="editForm.remark"
+                :autosize="{ minRows: 2, maxRows: 5 }"
+                type="textarea" 
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button type="danger" @click="handleClose">关 闭</el-button>
@@ -272,6 +283,12 @@ export default {
             })
             this.editForm.endIds = endIds.substring(0, endIds.length - 1)
           }
+          let addressIds = ''
+          this.editForm.addressId.forEach(item => {
+            addressIds += item + ','
+          })
+          this.editForm.addressIds = addressIds.substring(0, addressIds.length - 1)
+
           const { code, msg } = await this.saveApi(this.editForm)
           if (code === 0) {
             this.$message.success(msg)
@@ -286,7 +303,11 @@ export default {
     // 回调方法
     back() {
       if (this.editForm.addressId) {
-        this.$set(this.editForm, 'addressId', this.editForm.addressId + '')
+        let ids = this.editForm.addressId.split(',')
+        this.editForm.addressId = []
+        ids.forEach(item => {
+          this.editForm.addressId.push(item)
+        })
       }
       if (this.editForm.startJumpIds) {
         let ids = this.editForm.startJumpIds.split(',')

+ 1 - 1
src/views/workshop/deliveryPlan/index.vue

@@ -57,7 +57,7 @@
     >
       <el-table-column label="NO" prop="id" align="center" width="40" type="index" />
       <el-table-column label="品名" min-width="60" align="center" prop="securities" />
-      <el-table-column label="入库地点" min-width="120" align="center" prop="addressCn" />
+      <el-table-column label="入库地点" min-width="130" align="center" prop="addressCn" show-overflow-tooltip />
       <el-table-column label="解缴时间" min-width="120" align="center" prop="planDeliveryDate" />
       <el-table-column label="数量(万枚)" min-width="90" align="center" prop="qty" />
       <el-table-column label="箱数" min-width="60" align="center" prop="totalBoxNum" />

+ 5 - 1
src/views/workshop/deliveryPlan/index1.vue

@@ -37,7 +37,7 @@
             :header-cell-style="{ background: '#eef1f6', color: '#606266' }">
       <el-table-column label="NO" prop="id" align="center" width="40" type="index" />
       <el-table-column label="品名" min-width="60" align="center" prop="securities" />
-      <el-table-column label="入库地点"  min-width="120" align="center" prop="addressCn" />
+      <el-table-column label="入库地点" min-width="130" align="center" prop="addressCn" show-overflow-tooltip />
       <el-table-column label="解缴时间" min-width="120" align="center" prop="planDeliveryDate" />
       <el-table-column label="数量(万枚)" min-width="90" align="center" prop="qty" />
       <el-table-column label="箱数" min-width="60" align="center" prop="totalBoxNum" />
@@ -123,6 +123,10 @@
           合计:
           <span class="ml30">箱数:</span><span class="ml30">{{ printEdit.planBoxNum }}</span>
         </p>
+        <p class="sub-title mt30">
+          备注:
+          <span class="ml30">{{ printEdit.remark }}</span>
+        </p>
         <div class="sub-title mt30 border">
           <div class="ml30 right">管库员签字(2人):</div>
         </div>