caojunjie пре 1 година
родитељ
комит
6c74aa4ccb

+ 35 - 10
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -246,6 +246,21 @@
                         </template>
                     </el-table-column>
                     <el-table-column
+                        prop="taxRate"
+                        label="税率" width="100px"
+                        header-align="center">
+                    </el-table-column>
+                    <el-table-column
+                        prop="surchargeRate"
+                        label="附件税率" width="100px"
+                        header-align="center">
+                    </el-table-column>
+                    <el-table-column
+                        prop="isTax"
+                        label="单价是否含税" width="100px"
+                        header-align="center">
+                    </el-table-column>
+                    <el-table-column
                         prop="price"
                         header-align="center"
                         label="单价" width="120px">
@@ -266,6 +281,16 @@
                         </template>
                     </el-table-column>
                     <el-table-column
+                        prop="rmbAmountNet"
+                        label="CNY(净额)" width="100px"
+                        header-align="center">
+                    </el-table-column>
+                    <el-table-column
+                        prop="usdAmountNet"
+                        label="USD(净额)" width="100px"
+                        header-align="center">
+                    </el-table-column>
+                    <el-table-column
                         prop="rmbAmount"
                         header-align="center"
                         label="CNY(含税)" width="100px">
@@ -483,16 +508,16 @@
                             <span v-else>{{row.quantity}}</span>
                         </template>
                     </el-table-column>
-                    <!--<el-table-column-->
-                    <!--    prop="rmbAmountNet"-->
-                    <!--    label="CNY(净额)" width="100px"-->
-                    <!--    header-align="center">-->
-                    <!--</el-table-column>-->
-                    <!--<el-table-column-->
-                    <!--    prop="usdAmountNet"-->
-                    <!--    label="USD(净额)" width="100px"-->
-                    <!--    header-align="center">-->
-                    <!--</el-table-column>-->
+                    <el-table-column
+                        prop="rmbAmountNet"
+                        label="CNY(净额)" width="100px"
+                        header-align="center">
+                    </el-table-column>
+                    <el-table-column
+                        prop="usdAmountNet"
+                        label="USD(净额)" width="100px"
+                        header-align="center">
+                    </el-table-column>
                     <el-table-column
                         prop="rmbAmount"
                         label="CNY(含税)" width="100px"

+ 4 - 0
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -1145,9 +1145,13 @@ import {dateFormat} from "@/util/date";
                     if (item.curCode == 'CNY') {
                         this.$set(item,'rmbAmount',item.amount)
                         this.$set(item,'usdAmount','')
+                        this.$set(item,'rmbAmountNet',item.amountNet)
+                        this.$set(item,'usdAmountNet','')
                     }else {
                         this.$set(item,'usdAmount',item.amount)
                         this.$set(item,'rmbAmount','')
+                        this.$set(item,'usdAmountNet',item.amountNet)
+                        this.$set(item,'rmbAmountNet','')
                     }
                     item.edit = false
                 }

+ 108 - 48
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/detailsPage.vue

@@ -35,12 +35,36 @@
               </template>
               <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                   <el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"
-                             :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
+                             :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">
+                      {{row.$cellEdit?'保存':'编辑'}}
                   </el-button>
                   <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type"
                              @click="rowDelBox(row, index)">删除
                   </el-button>
               </template>
+
+              <template slot="goodsNum" slot-scope="{row}">
+                  <el-input-number v-if="row.$cellEdit" v-model="row.goodsNum" size="small" :controls="false" :precision="0" style="width: 100%" />
+                  <span v-else>{{row.goodsNum}}</span>
+              </template>
+              <template slot="dot" slot-scope="{row}">
+                  <!--使用allow-create属性即可通过在输入框中输入文字来创建新的条目。注意此时filterable必须为真。-->
+                  <!--本例还使用了default-first-option属性, 在该属性打开的情况下,按下回车就可以选中当前选项列表中的第一个选项,-->
+                  <!--无需使用鼠标或键盘方向键进行定位。-->
+                  <!--allow-create filterable default-first-option-->
+                  <el-select v-if="row.$cellEdit" v-model="row.dot" size="small" filterable default-first-option
+                             @focus="picihaolistfun(row.goodsId)"
+                             @change="picihaolistChangefun($event,row)">
+                      <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
+                                 :value="item.dot"></el-option>
+                  </el-select>
+                  <span v-else>{{ row.dot }}</span>
+              </template>
+              <template slot="price" slot-scope="{row}">
+                  <el-input-number v-if="row.$cellEdit" v-model="row.price" size="small" :controls="false" style="width: 100%" />
+                  <span v-else>{{row.price}}</span>
+              </template>
+
           </avue-crud>
       </trade-card>
 
@@ -79,6 +103,7 @@ export default {
   name: "detailsPage",
   data() {
     return {
+        picihaolist:[], // 批次号数据
         tableData:[],
         // 上传附件的需要参数
         loadingBtn:false,
@@ -122,7 +147,7 @@ export default {
             {
           label: '调出仓库',
           prop: "storageId",
-          disabled: false,
+          disabled: true,
           type: 'select',
           props: {
             label: 'cname',
@@ -137,7 +162,7 @@ export default {
         },{
             label: '调入仓库',
             prop: "callInStorageId",
-            disabled: false,
+            disabled: true,
             type: 'select',
             props: {
                 label: 'cname',
@@ -153,7 +178,7 @@ export default {
           label: '库管',
           prop: "stockClerkId",
           type: 'select',
-          disabled: false,
+          disabled: true,
           props: {
             label: 'realName',
             value: 'id'
@@ -169,7 +194,7 @@ export default {
           label: '业务日期',
           prop: "businesDate",
           searchProp: "businesDateList",
-          disabled: false,
+          disabled: true,
           type: "datetime",
           value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
           format: "yyyy-MM-dd HH:mm",
@@ -197,7 +222,7 @@ export default {
           prop: "remarks",
           type: 'textarea',
           disabled: false,
-          span: 16,
+          span: 24,
           minRows: 1
         }]
       },
@@ -246,6 +271,29 @@ export default {
           disabled: true,
           prop: 'goodsNo',
           width: 100
+        },{
+            label: '批次号',
+            prop: 'dot',
+            type: 'select',
+            // disabled: true,
+            dicData: [],
+            props: {
+                label: "dot",
+                value: "dot"
+            },
+            dicUrl: "/api/blade-sales-part/stockDesc/dotList",
+        },{
+            label: '库存数量',
+            prop: "inventory",
+            disabled: true,
+        }, {
+            label: '调拨数量',
+            prop: 'goodsNum',
+            disabled: false,
+        },{
+            label: '单价',
+            prop: "price",
+            disabled: true,
         }, {
           label: '品牌',
           prop: 'brandId',
@@ -272,27 +320,7 @@ export default {
           label: '轮胎描述',
           prop: 'goodsDescription',
           disabled: true,
-        }, {
-          label: '批次号',
-          prop: 'dot',
-          type: 'select',
-          // disabled: true,
-          dicData: [],
-          props: {
-            label: "dot",
-            value: "dot"
-          },
-          dicUrl: "/api/blade-sales-part/stockDesc/dotList",
-
-        },{
-            label: '库存数量',
-            prop: "inventory",
-            disabled: true,
-        }, {
-          label: '调拨数量',
-          prop: 'goodsNum',
-          disabled: false,
-        },{
+        },  {
             label: '单位',
             prop: 'units',
             type: "select",
@@ -304,7 +332,7 @@ export default {
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
         }, {
           label: '备注',
-          prop: 'remarks'
+          prop: 'remarks',
         }]
       },
     }
@@ -323,6 +351,17 @@ export default {
     if (this.detailData.id) {
       this.refresh()
     }else {
+        this.optionForm.column.forEach(item => {
+            if (item.prop == 'storageId'
+                || item.prop == 'remarks'
+                || item.prop == 'callInStorageId'
+                || item.prop == 'stockClerkId'
+                || item.prop == 'businesDate') {
+                item.disabled = false
+            } else {
+                item.disabled = true
+            }
+        })
         this.editButton = false
         this.isSave = false
     }
@@ -360,22 +399,41 @@ export default {
       })
     },
     rowEdit(row, index) {
-      if (this.form.statusName == '待出库') {
-        this.optionContactsBack.column.forEach(its => {
-          if (its.prop == 'dot') {
-            this.$set(its, 'disabled', false)
-          }
-        })
-      }
-      console.log('this.formContacts.goodsId', this.formContacts.goodsId);
-      dotList({
-        storageId: this.form.storageId,
-        goodsId: row.goodsId
-      }).then(res => {
-        this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
-      })
-      this.$refs.formContacts.rowEdit(row, index)
+        this.$set(row,'$cellEdit',!row.$cellEdit)
+      // if (this.form.statusName == '录入') {
+      //   this.optionContactsBack.column.forEach(its => {
+      //     if (its.prop == 'dot') {
+      //       this.$set(its, 'disabled', false)
+      //     }
+      //   })
+      // }
+      // console.log('this.formContacts.goodsId', this.formContacts.goodsId);
+      // dotList({
+      //   storageId: this.form.storageId,
+      //   goodsId: row.goodsId
+      // }).then(res => {
+      //   this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
+      // })
+      // this.$refs.formContacts.rowEdit(row, index)
+
     },
+      // 批次号获取数据
+      picihaolistfun(goodsId){
+          dotList({
+              storageId:this.form.storageId,
+              goodsId: goodsId
+          }).then(res=>{
+              this.picihaolist = res.data.data
+          })
+      },
+      // 批次号
+      picihaolistChangefun(value,row){
+          for (let item of this.picihaolist) {
+              if (item.dot == value) {
+                  this.$set(row,'inventory',item.balanceQuantity)
+              }
+          }
+      },
       // 确认调拨
     complete() {
       if (!this.form.id) {
@@ -556,16 +614,18 @@ export default {
         this.optionForm.column.forEach(item => {
           if (item.prop == 'storageId'
             || item.prop == 'remarks'
-            || item.prop == 'createTime'
+            || item.prop == 'callInStorageId'
             || item.prop == 'stockClerkId'
-            || item.prop == 'shipType'
-            || item.prop == 'logisticsCorpName'
-            || item.prop == 'expressNo') {
+            || item.prop == 'businesDate') {
             item.disabled = false
           } else {
             item.disabled = true
           }
         })
+          if (this.form.shipItemsList.length != 0) {
+              this.findObject(this.optionForm.column, "storageId").disabled = true
+          }
+
         this.isAddDisabled = false
         this.optionContactsBack.column.forEach(its => {
           if (its.prop == 'dot') {
@@ -597,7 +657,7 @@ export default {
           for(let item of this.tableData) {
               let obj = {
                   goodsId:item.id,
-                  price:item.price,
+                  price:item.price, // 单价
                   goodsName:item.cname,
                   goodsNum:item.goodsNum,
                   brandName:item.brandName,

+ 7 - 2
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue

@@ -26,7 +26,7 @@
                             </template>
                             <template slot="goodsNum" slot-scope="{row}">
                                 <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
-                                                 @input="amountChange(row)" style="width: 100%" />
+                                                 @change="amountChange($event,row)" style="width: 100%" />
                             </template>
                             <template slot="dot" slot-scope="{row}">
                                 <!--使用allow-create属性即可通过在输入框中输入文字来创建新的条目。注意此时filterable必须为真。-->
@@ -200,7 +200,12 @@ import {getCorpTypes} from "@/api/tirePartsMall/basicData/commodityInformation";
                 this.$message.success("保存成功");
             },
             // 商品信息价格计算
-            amountChange(row) {
+            amountChange(value,row) {
+                if (value > 0) {
+                    this.$refs.crud.toggleRowSelection(row,true);
+                }else {
+                    this.$refs.crud.toggleRowSelection(row,false);
+                }
                 // 价格
                 // if (!row.price) {
                 //     row.price = 0;

+ 3 - 0
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/index.vue

@@ -406,6 +406,9 @@ export default {
     },
     searchChange(params, done) {
         this.page.currentPage = 1
+        if (params.storageId) {
+            params.stock = params.storageId
+        }
       done();
       this.onLoad(this.page, params)
     },

+ 7 - 2
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -232,7 +232,7 @@
                             </template>
                             <template slot="goodsNum" slot-scope="{row}">
                                 <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
-                                                 @input="amountChange(row)" style="width: 100%" />
+                                                 @input="amountChange($event,row)" style="width: 100%" />
                             </template>
 
                             <template slot="dot" slot-scope="{row}">
@@ -1220,7 +1220,12 @@ export default {
             }
         },
         // 商品信息价格计算
-        amountChange(row) {
+        amountChange(value,row) {
+            if (value > 0) {
+                this.$refs.crud.toggleRowSelection(row,true);
+            }else {
+                this.$refs.crud.toggleRowSelection(row,false);
+            }
             // 价格
             // if (!row.price) {
             //     row.price = 0;

+ 7 - 2
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -218,7 +218,7 @@
                             </template>
                             <template slot="goodsNum" slot-scope="{row}">
                                 <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
-                                                 @input="amountChange(row)" style="width: 100%" />
+                                                 @input="amountChange($event,row)" style="width: 100%" />
                             </template>
                             <template slot="dot" slot-scope="{row}">
                                 <!--使用allow-create属性即可通过在输入框中输入文字来创建新的条目。注意此时filterable必须为真。-->
@@ -1252,7 +1252,12 @@ export default {
             }
         },
         // 商品信息价格计算
-        amountChange(row) {
+        amountChange(value,row) {
+            if (value > 0) {
+                this.$refs.crud.toggleRowSelection(row,true);
+            }else {
+                this.$refs.crud.toggleRowSelection(row,false);
+            }
             // 价格
             // if (!row.price) {
             //     row.price = 0;