瀏覽代碼

轮胎的采购

caojunjie 2 年之前
父節點
當前提交
07c17ee149

+ 18 - 1
src/views/tirePartsMall/configuration/commodity.json

@@ -35,8 +35,25 @@
       "width": 120
     },
     {
+      "label": "批次号",
+      "prop": "dot",
+      "cell":true,
+      "width": "150",
+      "type": "select",
+      "disabled": true,
+      "allowCreate": true,
+      "filterable": true,
+      "dicData": [],
+      "props": {
+        "label": "dot",
+        "value": "dot"
+      },
+      "dicUrl": "/api/blade-sales-part/stockDesc/dotList",
+      "overHidden": true
+    },
+    {
       "label": "库存",
-      "prop": "goodsTypeName",
+      "prop": "inventory",
       "hide": true,
       "addDisabled": false,
       "multiple": true,

+ 17 - 0
src/views/tirePartsMall/configuration/commodityxsho.json

@@ -35,6 +35,23 @@
       "width": 120
     },
     {
+      "label": "批次号",
+      "prop": "dot",
+      "cell":true,
+      "width": "150",
+      "type": "select",
+      "disabled": true,
+      "allowCreate": true,
+      "filterable": true,
+      "dicData": [],
+      "props": {
+        "label": "dot",
+        "value": "dot"
+      },
+      "dicUrl": "/api/blade-sales-part/stockDesc/dotList",
+      "overHidden": true
+    },
+    {
       "label": "库存",
       "prop": "inventory",
       "addDisabled": false,

+ 33 - 5
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -106,6 +106,11 @@
                                 <span v-else>{{ row.dot }}</span>
                             </template>
 
+                            <template slot="remarks" slot-scope="{ row }">
+                                <el-input v-if="row.pricetype" size="small" v-model="row.remarks" style="width: 100%"></el-input>
+                                <span v-else>{{ row.remarks }}</span>
+                            </template>
+
                             <!-- <template slot-scope="{scope,row}" slot="goodsNum">
                                 <el-input size="small" v-model="formContacts.goodsNum" style="width: 100%">
                                     <template slot="inventory">{{ inventory }}吨</template>
@@ -213,7 +218,8 @@
                     <basic-container>
                         <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
                                    @refresh-change="refreshChange" @selection-change="selectionChange" @search-change="goodsSearch"
-                                   :page.sync="page" @on-load="onLoad">
+                                   :page.sync="page" @on-load="onLoad"
+                                   @resetColumn="resetCrud" @saveColumn="saveCrud" >
                             <template slot="menuLeft">
                                 <el-tabs v-model="activeNameTabs" @tab-click="tabHandle">
                                     <el-tab-pane label="查询结果" name="searchList" />
@@ -224,6 +230,15 @@
                                 <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
                                                  @input="amountChange(row)" style="width: 100%" />
                             </template>
+
+                            <template slot="dot" slot-scope="{row}">
+                                <el-select v-if="row.whether=='1'" v-model="row.dot" allow-create filterable default-first-option @focus="picihaolistfun(row.id)">
+                                    <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-scope="scope" slot="menu">
                                 <el-button type="text" icon="el-icon-edit" size="small"
                                            @click.stop="importStagList(scope.row, scope.index)" v-if="activeNameTabs == 'searchList'"
@@ -1132,7 +1147,7 @@ export default {
             getDetails({
                 id:this.detailData.id
             }).then(res=>{
-                console.log(res.data,1131)
+                this.form = res.data.data
                 this.form.orderItemsList = res.data.data.orderItemsList
             })
         },
@@ -1293,7 +1308,7 @@ export default {
         // 采购明细行编辑
         hangeditBtn(row,index){
             console.log(row)
-            this.picihaolistfun()
+            this.picihaolistfun(row.id)
             row.dotedittype = true
             // 价格数量
             row.goodsNumtype = true
@@ -1309,8 +1324,11 @@ export default {
             this.mingxibaocun = true
         },
         // 批次号获取数据
-        picihaolistfun(){
-            dotList().then(res=>{
+        picihaolistfun(goodsId){
+            dotList({
+                storageId:this.form.storageId,
+                goodsId: goodsId
+            }).then(res=>{
                 this.picihaolist = res.data.data
                 console.log(res.data.data,1282)
             })
@@ -2037,6 +2055,7 @@ export default {
             })
             console.log('新增了', row);
             this.getAllWorkDicts()
+            this.refreshChange()
             this.dialogVisible = true
             // this.$refs.formContacts.rowAdd()
         },
@@ -2090,6 +2109,15 @@ export default {
         },
         backToList(type) {
             this.$emit("backToList", type);
+        },
+
+        // 弹框的重置
+        resetCrud(){
+            this.$message.success("重置成功");
+        },
+        // 弹窗的保存
+        saveCrud(){
+            this.$message.success("保存成功");
         }
     }
 }

+ 32 - 5
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -87,6 +87,11 @@
                                 </el-select>
                                 <span v-else>{{ row.dot }}</span>
                             </template>
+
+                            <template slot="remarks" slot-scope="{ row }">
+                                <el-input v-if="row.pricetype" size="small" v-model="row.remarks" style="width: 100%"></el-input>
+                                <span v-else>{{ row.remarks }}</span>
+                            </template>
                             <!-- <template slot-scope="{scope,row}" slot="goodsNum">
                                 <el-input size="small" v-model="formContacts.goodsNum" style="width: 100%">
                                     <template slot="inventory">{{ inventory }}吨</template>
@@ -181,7 +186,8 @@
                     <basic-container>
                         <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
                                    @refresh-change="refreshChange" @selection-change="selectionChange" @search-change="goodsSearch"
-                                   :page.sync="page" @on-load="onLoad">
+                                   :page.sync="page" @on-load="onLoad"
+                                   @resetColumn="resetCrud" @saveColumn="saveCrud">
                             <template slot="menuLeft">
                                 <el-tabs v-model="activeNameTabs" @tab-click="tabHandle">
                                     <el-tab-pane label="查询结果" name="searchList" />
@@ -192,6 +198,13 @@
                                 <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
                                                  @input="amountChange(row)" style="width: 100%" />
                             </template>
+                            <template slot="dot" slot-scope="{row}">
+                                <el-select v-model="row.dot" allow-create filterable default-first-option @focus="picihaolistfun(row.goodsId)">
+                                    <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-scope="scope" slot="menu">
                                 <el-button type="text" icon="el-icon-edit" size="small"
                                            @click.stop="importStagList(scope.row, scope.index)" v-if="activeNameTabs == 'searchList'"
@@ -1070,6 +1083,7 @@ export default {
                 id:this.detailData.id
             }).then(res=>{
                 console.log(res.data,1131)
+                this.form = res.data.data
                 this.form.orderItemsList = res.data.data.orderItemsList
             })
         },
@@ -1196,7 +1210,7 @@ export default {
 
                             // sendNum:res.data.data[0],
                             // 备注
-                            // remarks:res.data.data[0]
+                            remarks:item.remarks,
                             // 批次号的状态
                             dotedittype:false,
                             // 价格数量
@@ -1245,7 +1259,7 @@ export default {
         // 采购明细行编辑
         hangeditBtn(row,index){
             console.log(row)
-            this.picihaolistfun()
+            this.picihaolistfun(row.goodsId)
             row.dotedittype = true
             // 价格数量
             row.goodsNumtype = true
@@ -1261,8 +1275,11 @@ export default {
             this.mingxibaocun = true
         },
         // 批次号获取数据
-        picihaolistfun(){
-            dotList().then(res=>{
+        picihaolistfun(goodsId){
+            dotList({
+                storageId:this.form.storageId,
+                goodsId: goodsId
+            }).then(res=>{
                 this.picihaolist = res.data.data
                 console.log(res.data.data,1282)
             })
@@ -2081,6 +2098,7 @@ export default {
                 this.page.billType = 1
             }
             this.getAllWorkDicts()
+            this.refreshChange()
             this.dialogVisible = true
             // this.$refs.formContacts.rowAdd()
         },
@@ -2116,6 +2134,15 @@ export default {
         },
         backToList(type) {
             this.$emit("backToList", type);
+        },
+
+        // 弹框的重置
+        resetCrud(){
+            this.$message.success("重置成功");
+        },
+        // 弹窗的保存
+        saveCrud(){
+            this.$message.success("保存成功");
         }
     }
 }