Преглед изворни кода

Merge branch 'xiaoqin' into mergeBranch

codeMan пре 2 година
родитељ
комит
8c374318d7

+ 5 - 2
src/HDrpManagement/dispatch/modules/productlist.vue

@@ -25,6 +25,7 @@
       </el-table-column>
       <el-table-column
         prop="orderRowno"
+        width="100px"
         label="订单行号"
       fixed>
       </el-table-column>
@@ -73,7 +74,7 @@
           label="数量"
           width="180">
         <template slot-scope="scope">
-          <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="data.STATUS === '新建'" size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" :step="scope.row.orderaddqty" label="输入数量" @change="rowChange(scope.row,scope.$index)"></el-input-number>
+          <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="data.STATUS === '新建'" size="mini" v-model="scope.row.qty" :min="0" :max="scope.row.undeliqty" :step="scope.row.orderaddqty" label="输入数量" @change="rowChange(scope.row,scope.$index)"></el-input-number>
           <span v-else>{{scope.row.qty}}</span>
         </template>
       </el-table-column>
@@ -83,7 +84,8 @@
       </el-table-column>
       <el-table-column
         prop="undeliqty"
-        label="未发货数量">
+        label="未发货数量"
+        width="100px">
       </el-table-column>
       <el-table-column
           label="备注"
@@ -96,6 +98,7 @@
       </el-table-column>
       <el-table-column
         prop="suminqty"
+        width="120px"
         label="erp即时库存">
       </el-table-column>
       <el-table-column

+ 6 - 3
src/HDrpManagement/invoiceapp/modules/add.vue

@@ -34,7 +34,9 @@
                   trigger="click"
                   :disabled="form.enterprisename === ''"
                   v-model="visible1">
-                  <invoiceCanUseTax :sys_enterpriseid="form.sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow"></invoiceCanUseTax>
+                  <invoiceCanUseTax :sys_enterpriseid="form.sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow">
+                    <addInvoice slot="add" @onSuccess="$refs.UseTax.listData()" :data="{sys_enterpriseid:form.sys_enterpriseid}"></addInvoice>
+                  </invoiceCanUseTax>
                   <el-input readonly :disabled="form.enterprisename === ''" slot="reference" v-model="form.taxno" @focus="queryTax" suffix-icon="el-icon-arrow-down" placeholder="选择税号"></el-input>
                 </el-popover>
               </el-form-item>
@@ -107,7 +109,7 @@
 <script>
 import invoiceCanUseAgent from '@/template/invoiceCanUseAgent/index.vue'
 import invoiceCanUseTax from '@/template/invoiceCanUseTax/index.vue'
-
+import addInvoice from '@/components/financialInfo/modules/add'
 export default {
   data () {
     var checktaxno = (rule, value, callback) => {
@@ -155,7 +157,8 @@ export default {
   },
   components:{
     invoiceCanUseAgent,
-    invoiceCanUseTax
+    invoiceCanUseTax,
+    addInvoice
   },
   methods:{
     onClose () {

+ 6 - 2
src/HDrpManagement/invoiceapp/modules/edit.vue

@@ -33,7 +33,9 @@
                   placement="bottom"
                   trigger="click"
                   v-model="visible1">
-                  <invoiceCanUseTax :sys_enterpriseid="form.sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow"></invoiceCanUseTax>
+                  <invoiceCanUseTax :sys_enterpriseid="form.sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow">
+                    <addInvoice slot="add" @onSuccess="$refs.UseTax.listData()" :data="{sys_enterpriseid:form.sys_enterpriseid}"></addInvoice>
+                  </invoiceCanUseTax>
                   <el-input readonly slot="reference" v-model="form.taxno"  suffix-icon="el-icon-arrow-down" @focus="queryTax" placeholder="税号"></el-input>
                 </el-popover>
               </el-form-item>
@@ -105,6 +107,7 @@
 <script>
 import invoiceCanUseAgent from '@/template/invoiceCanUseAgent/index.vue'
 import invoiceCanUseTax from '@/template/invoiceCanUseTax/index.vue'
+import addInvoice from '@/components/financialInfo/modules/add'
 
 export default {
   props:['data'],
@@ -160,7 +163,8 @@ export default {
   },
   components:{
     invoiceCanUseAgent,
-    invoiceCanUseTax
+    invoiceCanUseTax,
+    addInvoice
   },
   methods:{
     onShow () {

+ 189 - 0
src/HDrpManagement/orderManage/details/tabs/addProduct.vue

@@ -0,0 +1,189 @@
+<template>
+<div>
+  <div class="flex-align-center flex-between mt-10">
+    <el-input style="width:200px" size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" clearable></el-input>
+    <el-button type="primary" size="small" :disabled="tableSelectData.length === 0" @click="onConfirm">添加选中商品</el-button>
+  </div>
+  <div>
+    <el-table
+      ref="multipleTable"
+      :data="tableData"
+      style="width: 100%"
+      :header-cell-style="{height:'50px',color:'#768093',fontWeight:'400'}"
+      :cell-style="{height:'50px',color:'#768093',fontWeight:'400'}"
+      size="mini"
+      border
+      @selection-change="selectionChange">
+      <el-table-column
+        type="selection"
+        width="55"
+      fixed>
+      </el-table-column>
+      <el-table-column
+        prop="itemname"
+        label="商品名称"
+        width="180">
+      </el-table-column>
+      <el-table-column
+        prop="itemno"
+        label="编码"
+        width="180">
+      </el-table-column>
+      <el-table-column
+        label="型号"
+        width="180">
+        <template slot-scope="scope">
+          <p><span>{{scope.row.model}}</span></p>
+        </template>
+      </el-table-column>
+      <el-table-column
+          label="规格"
+          width="180">
+        <template slot-scope="scope">
+          <p><span>{{scope.row.spec}}</span></p>
+        </template>
+      </el-table-column>
+      <el-table-column
+          label="材质"
+          width="180">
+        <template slot-scope="scope">
+          <p><span>{{scope.row.material || '--'}}</span></p>
+        </template>
+      </el-table-column>
+      <el-table-column
+          label="标准"
+          width="180">
+        <template slot-scope="scope">
+          <p><span>{{scope.row.standards || '--'}}</span></p>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="unit"
+        label="计量单位">
+        <template slot-scope="scope">
+          <el-tag size="mini" type="info" effect="plain">{{scope.row.unit}}/{{scope.row.auxunit}}</el-tag>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="margin-top:16px;text-align:right">
+      <el-pagination
+        background
+        small
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="params.content.pageSize"
+        layout="total, prev, pager, next, jumper"
+        :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</div>
+</template>
+
+<script>
+import uploadFile from '@/components/upload/hw_obs_upload'
+import previewImage from '@/components/previewImage/index'
+
+export default {
+  props:['data','drawer'],
+  data () {
+    return {
+      params:{
+        "id": null,
+        "content": {
+            "sa_orderid": 0, //订单ID
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+                "condition": ""
+            }
+        },
+      },
+      tableSelectData:[],
+      tableData: [],
+      total:0,
+      currentPage:0
+    }
+  },
+  components:{
+    uploadFile,
+    previewImage
+  },
+  methods:{
+    async listData () {
+      switch (this.data.type) {
+        case '标准订单':
+          this.params.id = 20221109153502
+          break;
+        case '项目订单':
+          this.params.id = 20230103155002
+          break;
+        case '促销订单':
+          this.params.id = 20230107182302
+          break;
+        case '工具订单':
+          this.params.id = 20221109153502
+          break;
+        default:
+          this.params.id = 20221109153502
+          break;
+      } 
+      this.params.content.sa_orderid = this.$route.query.id
+      const res = await this.$api.requested(this.params)
+      this.tableData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      console.log(res,'mx')
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+      this.listData()
+    },
+    selectionChange (val) {
+      this.tableSelectData = val
+    },
+    onConfirm () {
+      this.$emit('onConfirm',this.tableSelectData)
+    },
+    clearSelection () {
+      this.$refs.multipleTable.clearSelection();
+    }
+  },
+  mounted () {
+    this.listData()
+  },
+  watch:{
+    drawer (val) {
+      val?this.listData():''
+    }
+  }
+}
+
+</script>
+<style>
+</style>
+<style scoped>
+.produtMag-panel{
+  /* margin: 30px; */
+  padding:0 10px 10px 10px;
+  background: #fff;
+  border-radius:5px;
+  overflow: hidden;
+  border:1px solid rgb(0 0 0 / 5%)
+  /* box-shadow: 0 5px 5px rgb(0 0 0 / 10%);
+  transform: translate3d(0,-2px,0); */
+}
+.image {
+  width:40px;height:40px;margin:0px auto;
+}
+/deep/.el-table {
+  height: calc(100vh - 180px) !important;
+}
+</style>

+ 3 - 4
src/HDrpManagement/orderManage/details/tabs/productlist.vue

@@ -9,8 +9,6 @@
       <el-table
         ref="multipleTable"
         :data="tableData"
-        style="width: 100%;"
-        max-height="410px"
         size="small"
         stripe
         border
@@ -287,7 +285,7 @@
 </template>
 
 <script>
-import addProduct from '@/template/orderCanUseProduct/index.vue'
+import addProduct from './addProduct'
 
 export default {
   props:['data','type'],
@@ -496,5 +494,6 @@ export default {
 }
 
 </script>
-<style>
+<style scoped>
+
 </style>

+ 2 - 1
src/SDrpManagement/ProductGroup/modules/Select.vue

@@ -13,7 +13,7 @@
         <li  :class="class_act === ''?'act':''" class="brand-item border-all" @click="clickClass('')">全部分类</li>
         <li  :class="class_act === item.itemclassnum?'act':''" class="brand-item margin-notAll" v-for="item in itemclass" :key="item.itemclassnum" @click="clickClass(item)">{{item.itemclassname}}</li>
       </ul>
-      <classTree style="padding-left:80px" :data="activeClass.subdep" @onClassChange="change"></classTree>
+      <classTree ref="tree" style="padding-left:80px" :data="activeClass.subdep" @onClassChange="change"></classTree>
     </div>
   </div>
 </template>
@@ -99,6 +99,7 @@ export default {
         this.$emit('onClassChange',item)
       } else {
         this.class_act = ''
+        this.$refs.tree.class_act = 0
         this.$emit('onClassChange',item)
       }
       console.log('分类单机出发');

+ 1 - 1
src/SDrpManagement/Products/index.vue

@@ -33,7 +33,7 @@ export default {
     selectClass
   },
   methods:{
-    selectClick () {
+    selectClick (callback) {
       this.$refs['list'].params.content.pageNumber = 1
       this.$refs['list'].params.content.brandids = this.$refs['class'].brand_act?[this.$refs['class'].brand_act]:[]
       this.$refs['list'].params.content.tradefield = this.$refs['class'].field_act

+ 2 - 2
src/SDrpManagement/Products/modules/Select.vue

@@ -68,8 +68,8 @@ export default {
         }
       })
       this.brands = res.data
-      this.brand_act = res.data[0].sa_brandid
-      this.clickBrand(res.data[0].sa_brandid)
+      this.brand_act = ''
+      // this.clickBrand(res.data[0].sa_brandid)
     },
 
     async queryClass () {

+ 2 - 1
src/SDrpManagement/Products/modules/list.vue

@@ -128,7 +128,8 @@ export default {
     }
   },
   mounted () {
-    this.listData()
+    this.$parent.selectClick()
+    // this.listData()
     this.usertype = JSON.parse(sessionStorage.getItem('active_account')).usertype
   }
 }

+ 0 - 1
src/SDrpManagement/agentOrder/modules/edit.vue

@@ -381,7 +381,6 @@ export default {
         if (this.data.type === '标准订单' ||  this.data.type === '特殊订单') {
           this.isusedrebate === 1?this.useRebate(this.data.rebateamount):""
         }
-        this.drawer = false
       })
     },
     onEditSuccess () {

+ 5 - 2
src/SDrpManagement/agentOrder/modules/productlist.vue

@@ -51,7 +51,10 @@
         width="180"
         prop="qty">
         <template slot-scope="scope">
-          <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="data.status === '新建'" size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" :step="scope.row.orderaddqty" label="输入数量" @change="qtyChange(scope.row,scope.$index)"></el-input-number>
+          <el-input-number 
+            :controls="true" controls-position='right' 
+            :step-strictly="true" v-if="data.status === '新建'" 
+            size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" :step="scope.row.undeliqty" label="输入数量" @change="qtyChange(scope.row,scope.$index)"></el-input-number>
           <span v-else>{{scope.row.qty}}</span>
         </template>
       </el-table-column>
@@ -163,7 +166,7 @@
         width="300"
         fixed="right">
         <template slot-scope="scope">
-          <el-input type="textarea"  @blur="onConfirm([scope.row],true)" size="small" v-model="scope.row.remarks" placeholder="请输入备注"></el-input>
+          <el-input type="textarea" :disabled="data.status != '新建'" @blur="onConfirm([scope.row],true)" size="small" v-model="scope.row.remarks" placeholder="请输入备注"></el-input>
         </template>
       </el-table-column>
        <el-table-column v-if="data.status === '新建'" width="90" fixed="right">

+ 2 - 5
src/SDrpManagement/salerOrder/modules/edit.vue

@@ -277,7 +277,7 @@ export default {
           }
         }
       },
-      aaddresstotal:0
+      addresstotal:0
     }
   },
   created () {
@@ -385,13 +385,10 @@ export default {
         if (this.data.type === '标准订单' ||  this.data.type === '特殊订单') {
           this.isusedrebate === 1?this.useRebate(this.data.rebateamount):""
         }
-        console.log('触发');
-        
-        this.drawer = false
       })
     },
     onEditSuccess () {
-      this.$refs.addpro.listData()
+      this.$refs.prolist.listData()
     },
     addMoreProduct () {
       this.setcol === 12?this.setcol = 24 : this.setcol = 12

+ 7 - 2
src/SDrpManagement/salerOrder/modules/productlist.vue

@@ -51,7 +51,12 @@
         width="180"
         prop="qty">
         <template slot-scope="scope">
-          <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="data.status === '新建'" size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" :step="scope.row.orderaddqty" label="输入数量" @change="qtyChange(scope.row,scope.$index)"></el-input-number>
+          <el-input-number 
+            :controls="true" 
+            controls-position='right' 
+            :step-strictly="true" 
+            v-if="data.status === '新建'" size="mini" 
+            v-model="scope.row.qty" :min="scope.row.orderminqty" :max="scope.row.undeliqty" :step="scope.row.orderaddqty" label="输入数量" @change="qtyChange(scope.row,scope.$index)"></el-input-number>
           <span v-else>{{scope.row.qty}}</span>
         </template>
       </el-table-column>
@@ -176,7 +181,7 @@
         width="300"
         fixed="right">
         <template slot-scope="scope">
-          <el-input type="textarea"  @blur="onConfirm([scope.row],true)" size="small" v-model="scope.row.remarks" placeholder="请输入备注"></el-input>
+          <el-input type="textarea"  :disabled="data.status != '新建'" @blur="onConfirm([scope.row],true)" size="small" v-model="scope.row.remarks" placeholder="请输入备注"></el-input>
         </template>
       </el-table-column>
       <el-table-column v-if="data.status === '新建'" width="90" fixed="right">

+ 7 - 3
src/SDrpManagement/sinvoiceapp/modules/add.vue

@@ -33,7 +33,9 @@
                   placement="bottom"
                   trigger="click"
                   v-model="visible1">
-                  <invoiceCanUseTax :sys_enterpriseid="form.sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow"></invoiceCanUseTax>
+                  <invoiceCanUseTax :sys_enterpriseid="sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow">
+                    <addInvoice slot="add" @onSuccess="$refs.UseTax.listData()" :data="{sys_enterpriseid:sys_enterpriseid}"></addInvoice>
+                  </invoiceCanUseTax>
                   <el-input readonly slot="reference" v-model="form.taxno" @focus="queryTax" suffix-icon="el-icon-arrow-down" placeholder="选择税号"></el-input>
                 </el-popover>
               </el-form-item>
@@ -100,7 +102,7 @@
 <script>
 // import invoiceCanUseAgent from '@/template/invoiceCanUseAgent/indexCopy1.vue'
 import invoiceCanUseTax from '@/template/invoiceCanUseTax/index.vue'
-
+import addInvoice from '@/components/financialInfo/modules/add'
 export default {
   data () {
     var checktaxno = (rule, value, callback) => {
@@ -121,6 +123,7 @@ export default {
         byhand:false,
         invoiceline:'p'
       },
+      sys_enterpriseid:JSON.parse(window.sessionStorage.getItem('accountinfo')).agenthr.sys_enterpriseid ? JSON.parse(window.sessionStorage.getItem('accountinfo')).agenthr.sys_enterpriseid : '',
       value:'',
       rules:{
         taxno: [
@@ -133,7 +136,8 @@ export default {
     }
   },
   components:{
-    invoiceCanUseTax
+    invoiceCanUseTax,
+    addInvoice
   },
   methods:{
     onClose () {

+ 7 - 3
src/SDrpManagement/sinvoiceapp/modules/edit.vue

@@ -32,7 +32,9 @@
                   placement="bottom"
                   trigger="click"
                   v-model="visible1">
-                  <invoiceCanUseTax :sys_enterpriseid="form.sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow"></invoiceCanUseTax>
+                  <invoiceCanUseTax :sys_enterpriseid="sys_enterpriseid" ref="UseTax" @selectTaxRow="selectTaxRow">
+                    <addInvoice slot="add" @onSuccess="$refs.UseTax.listData()" :data="{sys_enterpriseid:sys_enterpriseid}"></addInvoice>
+                  </invoiceCanUseTax>
                   <el-input readonly slot="reference" v-model="form.taxno" @focus="queryTax" placeholder="税号"></el-input>
                 </el-popover>
               </el-form-item>
@@ -99,7 +101,7 @@
 <script>
 // import invoiceCanUseAgent from '@/template/invoiceCanUseAgent/indexCopy1.vue'
 import invoiceCanUseTax from '@/template/invoiceCanUseTax/index.vue'
-
+import addInvoice from '@/components/financialInfo/modules/add'
 export default {
   props:['data'],
   data () {
@@ -129,6 +131,7 @@ export default {
         byhand:false,
       },
       value:'',
+      sys_enterpriseid:JSON.parse(window.sessionStorage.getItem('accountinfo')).agenthr.sys_enterpriseid ? JSON.parse(window.sessionStorage.getItem('accountinfo')).agenthr.sys_enterpriseid : '',
       rules:{
         enterprisename: [
           { required: true, message: '请输入活动名称', trigger: 'blur' },
@@ -140,7 +143,8 @@ export default {
     }
   },
   components:{
-    invoiceCanUseTax
+    invoiceCanUseTax,
+    addInvoice
   },
   methods:{
     onShow () {

+ 3 - 1
src/components/financialInfo/modules/add.vue

@@ -47,6 +47,7 @@
 </template>
 
 <script>
+import { log } from '@antv/g2plot/lib/utils';
 export default {
   props:['data'],
   data () {
@@ -89,7 +90,8 @@ export default {
   },
   methods:{
     onSubmit () {
-
+      console.log(this.data);
+      
       this.$refs['form'].validate(async (valid) => {
         if (! valid) return false
         if (this.form.isdefault){

+ 2 - 0
src/template/invoiceCanUseTax/index.vue

@@ -2,6 +2,7 @@
   <div> 
     <div class="flex-align-center flex-between mt-10">
       <el-input style="width:200px" size="small"  suffix-icon="el-icon-search" v-model="param.content.where.condition" placeholder="搜索" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
+      <slot name="add"></slot>
     </div>
     <div>
       <el-table
@@ -67,6 +68,7 @@ export default {
       param:{
         "id": "20221217135803",
         "content": {
+          "nocache":true,
           "pageNumber":1,
           "pageSize":20,
           "sys_enterpriseid":0,