Bladeren bron

商品详情调整

qymljy 1 jaar geleden
bovenliggende
commit
256e367263

+ 17 - 4
src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

@@ -37,12 +37,12 @@
         <span style="color:#888;font-size: 14px;margin-left: 10px">装箱数:{{selectProduct.packqty}}</span>
         <span style="color:#888;font-size: 14px;margin-left: 10px">库存:
           <template v-if="usertype === 0 || usertype === 1">
-            <span>{{ selectProduct.cansaleqty }}</span>
+            <span>{{ stockData.invbal_qty }}</span>
           </template>
           <template v-else>
-            <span v-if="selectProduct.stockstatus === '紧缺'" style="color: red">{{selectProduct.stockstatus}}</span>
-            <span v-else-if="selectProduct.stockstatus === '充足'" style="color: green">{{selectProduct.stockstatus}}</span>
-            <span v-else>{{selectProduct.stockstatus}}</span>
+            <span v-if="stockData.stockstatus === '紧缺'" style="color: red">{{stockData.stockstatus}}</span>
+            <span v-else-if="stockData.stockstatus === '充足'" style="color: green">{{stockData.stockstatus}}</span>
+            <span v-else>{{stockData.stockstatus}}</span>
           </template>
         </span>
       </div>
@@ -133,6 +133,7 @@ export default {
       actTradefield:'',
       usertype:"",
       length:"",
+      stockData:'',
       param: {
         "id": "20230629154503",
         "content": {
@@ -171,6 +172,7 @@ export default {
       this.actTradefield = this.detail?this.detail[0].tradefield?this.detail[0].tradefield[0].tradefield:'':''
       this.count = this.detail[0].orderminqty*/
       this.queryDetail(res.data[0].itemid)
+      this.queryStock(res.data[0].itemid)
     },
     async queryDetail(itemid){
       if (this.$route.query.sys_enterpriseid){
@@ -209,6 +211,16 @@ export default {
       }
 
     },
+    /*查询库存状态*/
+    async queryStock(id){
+      const res = await this.$api.requested({
+        "id": 20220923155302,
+        "content": {
+          "itemid":id
+        },
+      })
+      this.stockData = res.data
+    },
     countChange (num) {
       this.count = num
     },
@@ -235,6 +247,7 @@ export default {
       this.count = data.orderminqty*/
       console.log(this.count)
       this.queryDetail(data.itemid)
+      this.queryStock(data.itemid)
     },
 
     async addCart () {

+ 15 - 3
src/template/addProductContract/index.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="添加商品"
         :visible.sync="dialogFormVisible"
-        size="90%"
+        size="80%"
         direction="rtl"
         :show-close="false"
         append-to-body
@@ -14,7 +14,7 @@
           <span class="header-title">选择报价单:</span>
           <el-popover
               placement="bottom"
-              width="800"
+              width="700"
               trigger="click"
               v-model="queryShow"
               @show="queryQuotationData">
@@ -23,25 +23,37 @@
                        v-model="quotationParams.content.where.condition" @keyup.native.enter="queryQuotationData(quotationParams.content.pageNumber = 1)"
                        @clear="queryQuotationData(quotationParams.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
             </el-input>
-            <el-table ref="tableQuotation" :data="quotationData" @row-click="rowClick">
+            <el-table ref="tableQuotation" :data="quotationData" height="396px" @row-click="rowClick" size="mini">
               <el-table-column
                   prop="status"
                   label="状态"
                   width="180">
+                <template slot-scope="scope">
+                  <span style="margin-left: 10px">{{ scope.row.status?scope.row.status:'--' }}</span>
+                </template>
               </el-table-column>
               <el-table-column
                   prop="billno"
                   label="单号"
                   width="180">
+                <template slot-scope="scope">
+                  <span style="margin-left: 10px">{{ scope.row.billno?scope.row.billno:'--'}}</span>
+                </template>
               </el-table-column>
               <el-table-column
                   prop="submitby"
                   label="提交人"
                   width="180">
+                <template slot-scope="scope">
+                  <span style="margin-left: 10px">{{ scope.row.submitby?scope.row.submitby:'--' }}</span>
+                </template>
               </el-table-column>
               <el-table-column
                   prop="submitdate"
                   label="提交时间">
+                <template slot-scope="scope">
+                  <span style="margin-left: 10px">{{ scope.row.submitdate?scope.row.submitdate:'--' }}</span>
+                </template>
               </el-table-column>
             </el-table>
             <div class="container normal-panel" style="text-align:right">