qymljy 2 éve
szülő
commit
ed0f3a0239

+ 1 - 1
src/HDrpManagement/dispatch/details/index.vue

@@ -25,7 +25,7 @@
         <default-info :mainData="mainData"></default-info>
       </div>
       <div slot="slot1" >
-        <product-list ref="product" :mainData="mainData"></product-list>
+        <product-list ref="product" :data="mainData"></product-list>
       </div>
     </basicDetails>
   </div>

+ 3 - 2
src/HDrpManagement/dispatch/modules/edit.vue

@@ -85,11 +85,11 @@
       <div class="mt-10">
         <div>
           <p class="normal-title inline-16">发货单产品</p>
-          <el-button type="text" size="mini" @click="addMoreProduct">{{setcol === 12?'关闭选择':'添加发货产品'}}</el-button>
+<!--          <el-button type="text" size="mini" @click="addMoreProduct">{{setcol === 12?'关闭选择':'添加发货产品'}}</el-button>-->
         </div>
         <el-row :gutter="10">
           <el-col :span="setcol">
-            <product-list ref="prolist" :type="'edit'" @onSuccess="onDelSuccess"></product-list>
+            <product-list ref="prolist" :type="'edit'" :data="data" @onSuccess="onDelSuccess"></product-list>
           </el-col>
           <el-col :span="24 - setcol">
             <add-disProduct ref="addpro" :data="data" @onConfirm="onConfirm"></add-disProduct>
@@ -206,6 +206,7 @@ export default {
           "iteminfos":data.map(e=>{
             e.sa_dispatch_itemsid = 0
             e.remarks = ''
+            e.qty=e.undeliqty
             return e
           })
         },

+ 100 - 6
src/HDrpManagement/dispatch/modules/productlist.vue

@@ -1,5 +1,10 @@
 <template>
   <div>
+    <el-row :gutter="10">
+      <el-col :span="setcol">
+        <div class="flex-align-center">
+          <el-button style="margin:0 0 10px 10px" size="small" type="primary" :disabled="data.STATUS !== '新建'" v-if="type !== 'confirmdate'" @click="drawer = true">{{setcol === 24?'添 加':'取 消'}}</el-button>
+        </div>
     <el-table
       ref="multipleTable"
       :data="tableData"
@@ -29,6 +34,14 @@
         prop="erpitemno"
         label="品号">
       </el-table-column>
+      <el-table-column
+          prop="model"
+          label="型号">
+      </el-table-column>
+      <el-table-column
+          prop="spec"
+          label="规格">
+      </el-table-column>
       <el-table-column
         prop="unitname"
         label="单位">
@@ -40,9 +53,18 @@
           {{tool.formatAmount(scope.row.price,2)}}
         </template>
       </el-table-column>
-      <el-table-column
+<!--      <el-table-column
         prop="qty"
         label="发货数量">
+      </el-table-column>-->
+      <el-table-column
+          prop="qty"
+          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>
+          <span v-else>{{scope.row.qty}}</span>
+        </template>
       </el-table-column>
       <el-table-column
         prop="amount"
@@ -53,8 +75,13 @@
         label="未发货数量">
       </el-table-column>
       <el-table-column
-        prop="remarks"
-        label="备注">
+          label="备注"
+          width="300"
+          prop="remarks">
+        <template slot-scope="scope">
+          <el-input v-if="data.STATUS === '新建'" v-model="scope.row.remarks" placeholder="输入订单备注" size="mini" @change="rowChange(scope.row,scope.$index)"></el-input>
+          <p v-else>{{scope.row.remarks}}</p>
+        </template>
       </el-table-column>
       <el-table-column
         prop="suminqty"
@@ -65,7 +92,7 @@
         width="120px"
         label="drp可发货数量">
       </el-table-column>
-      <el-table-column label="操作" v-if="type === 'edit'" width="90">
+      <el-table-column label="操作"  width="90">
         <template slot-scope="scope">
           <el-button type="text" size="mini" @click="deleteOrderProduct(scope.row)">删 除</el-button>
         </template>
@@ -83,15 +110,33 @@
         :total="total">
       </el-pagination>
     </div>
+      </el-col>
+      <el-col :span="24 - setcol">
+        <el-drawer
+            title="添加商品"
+            :visible.sync="drawer"
+            append-to-body
+            size="80%"
+            direction="rtl">
+          <div class="drawer__panel">
+            <addProduct :drawer="drawer" :data="data" @onConfirm="onConfirm"></addProduct>
+          </div>
+        </el-drawer>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import addProduct from '@/template/invoiceCanUseProduct/index.vue'
 export default {
-  props:['type'],
+  props:['type','data'],
+  components:{addProduct},
   data () {
     return {
       tableData:[],
+      drawer:false,
+      setcol:24,
       param:{
         "id": 20221115104703,
         "content": {
@@ -165,7 +210,56 @@ export default {
           "remarks":val.remarks
         })
       },500)
-    }
+    },
+    // 订单添加商品
+    async onConfirm (data) {
+      console.log(data,'添加商品')
+      const res = await this.$api.requested({
+        "id": 20221115104603,
+        "content": {
+          "sa_dispatchid": this.$route.query.id, //订单ID
+          "iteminfos":data.map(e=>{
+            e.sa_dispatch_itemsid = 0
+            e.qty=e.undeliqty
+            e.remarks = ''
+            return e
+          })
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.drawer = false
+        this.listData()
+        this.$emit('onSuccess')
+      })
+    },
+    rowChange(val,index){
+      let that = this
+
+      // // 防抖
+      if(this.time !== null){
+        clearTimeout(this.time);
+      }
+      this.time = setTimeout(() => {
+        that.updateOrder({
+          "sa_dispatchid": this.$route.query.id, //订单ID
+          "iteminfos": [{
+            "sa_dispatch_itemsid": val.sa_dispatch_itemsid,//0表示新增
+            "qty": val.qty, //数量
+            "remarks":val.remarks
+          }]
+        },()=>{
+          this.$set(this.tableData,index,val)
+        })
+      },1000)
+    },
+    async updateOrder (val,fn) {
+      const res  = await this.$api.requested({
+        "id": 20221115104603,
+        "content": val
+      })
+      this.$emit('onSuccess')
+      res.code === 1?fn():""
+    },
   },
   mounted () {
     this.listData()

+ 185 - 0
src/HDrpManagement/dispatch/modules/productlistCopy.vue

@@ -0,0 +1,185 @@
+<template>
+  <div>
+    <el-table
+      ref="multipleTable"
+      :data="tableData"
+      height="500px"
+      style="width: 100%;"
+      size="small"
+      stripe
+      border>
+      <!-- <el-table-column
+        type="selection"
+        width="55"
+        align="center">
+      </el-table-column> -->
+      <el-table-column
+        prop="rowno"
+        label="行号">
+      </el-table-column>
+      <el-table-column
+        prop="itemno"
+        label="产品编码">
+      </el-table-column>
+      <el-table-column
+        prop="itemname"
+        label="产品名称">
+      </el-table-column>
+      <el-table-column
+        prop="erpitemno"
+        label="品号">
+      </el-table-column>
+      <el-table-column
+          prop="model"
+          label="型号">
+      </el-table-column>
+      <el-table-column
+          prop="spec"
+          label="规格">
+      </el-table-column>
+      <el-table-column
+        prop="unitname"
+        label="单位">
+      </el-table-column>
+      <el-table-column
+        prop="price"
+        label="单价">
+        <template slot-scope="scope">
+          {{tool.formatAmount(scope.row.price,2)}}
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="qty"
+        label="发货数量">
+      </el-table-column>
+      <el-table-column
+        prop="amount"
+        label="发货金额">
+      </el-table-column>
+      <el-table-column
+        prop="undeliqty"
+        label="未发货数量">
+      </el-table-column>
+      <el-table-column
+        prop="remarks"
+        label="备注">
+      </el-table-column>
+      <el-table-column
+        prop="suminqty"
+        label="erp即时库存">
+      </el-table-column>
+      <el-table-column
+        prop="deliedqty"
+        width="120px"
+        label="drp可发货数量">
+      </el-table-column>
+      <el-table-column label="操作" v-if="type === 'edit'" width="90">
+        <template slot-scope="scope">
+          <el-button type="text" size="mini" @click="deleteOrderProduct(scope.row)">删 除</el-button>
+        </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="param.content.pageSize"
+        layout="total, prev, pager, next, jumper"
+        :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['type'],
+  data () {
+    return {
+      tableData:[],
+      param:{
+        "id": 20221115104703,
+        "content": {
+          "sa_orderid": 0,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+              "condition": ""
+          }
+        },
+      },
+      total:0,
+      currentPage:0,
+      time: null
+    }
+  },
+  methods:{
+    async listData () {
+      this.param.content.sa_dispatchid = this.$route.query.id
+      const res = await this.$api.requested(this.param)
+      this.tableData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      console.log(res.data);
+      
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+      this.listData()
+    },
+    async deleteOrderProduct (row) {
+      const res = await this.$api.requested({
+        "id": 20221115104803,
+        "content": {
+          "sa_dispatch_itemsids": [row.sa_dispatch_itemsid]
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.listData()
+        this.$emit('onSuccess')
+      })
+    },
+    async updateOrderProduct (val) {
+      const res  = await this.$api.requested({
+        "id": 20221110145302,
+        "content": val
+      })
+    },
+    qtyChange (val,index) {
+      let that = this
+      this.$set(this.tableData,index,val)
+      // console.log(val,this.tableData)
+      // // 防抖
+      if(this.time !== null){
+        clearTimeout(this.time);
+      }
+      this.time = setTimeout(() => {
+        that.updateOrderProduct({
+          "sa_orderitemsid":val.sa_orderitemsid,
+          "sa_orderid":this.$route.query.id,//订单ID
+          "itemid":val.itemid,//商品ID
+          "type":"数量",//调整类型,目前只支持数量
+          "oldvalue":val.qty,//原值
+          "newvalue":val.qty,//调整后值
+          "remarks":val.remarks
+        })
+      },500)
+    }
+  },
+  mounted () {
+    this.listData()
+  }
+}
+
+</script>
+<style>
+</style>

+ 2 - 1
src/HManagement/notice/list/modules/detailed.vue

@@ -5,7 +5,7 @@
           <el-button class="inline-16" v-if="edit" :disabled="form.status == '发布'" type="primary" size="small"  @click="onEdit()" >编 辑</el-button>
 <!--          <p class="inline-16" v-if="save">编辑</p>-->
           <release  class="inline-16" v-if="tool.checkAuth($route.name,'update') && status"  :data="form" @onSuccess="onSuccess"></release>
-          <topping  class="inline-16" v-if="tool.checkAuth($route.name,'update') && form.status == '发布'" :data="form" @onSuccess="onSuccess"></topping>
+          <topping  class="inline-16" v-if="tool.checkAuth($route.name,'update') && form.status == '发布' " :data="form" @onSuccess="onSuccess"></topping>
           <Del v-if="tool.checkAuth($route.name,'delete') && form.status == '新建'" @onSuccess="ondel"/>
           <!-- <delete-btn :id="$route.query.id" nameId="20221101095103" nameKey="sat_noticeids" v-if="form.status == '新建'" type="detail" class="inline-16" @deleteSuccess="drawer=false"></delete-btn> -->
         </div>
@@ -361,6 +361,7 @@ export default {
     },
     onSuccess(){
       this.drawer = false
+      this.queryNoticeMain()
       this.$emit("updateSuccess")
     },
     onClose(){

+ 2 - 2
src/HManagement/notice/list/modules/release.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
 <!--    <el-button type="text" size="mini" @click="releaseNotice">{{data.status === '发布'?'取消发布':'发布'}}</el-button>-->
-    <el-button v-show="release" type="primary" plain size="small"  @click="open">发布</el-button>
-    <el-button v-show="unRelease" type="primary" plain size="small"  @click="unOpen">取消发布</el-button>
+    <el-button v-if="release" type="primary" plain size="small"  @click="open">发布</el-button>
+    <el-button v-if="unRelease" type="primary" plain size="small"  @click="unOpen">取消发布</el-button>
   </div>
 </template>
 

+ 6 - 2
src/HManagement/notice/list/modules/tp.vue

@@ -26,6 +26,8 @@ export default {
         }
       })
       this.tool.showMessage(res,()=>{
+        this.unTop = true
+        this.top = false
         this.$emit('onSuccess')
       })
     },
@@ -39,6 +41,8 @@ export default {
         }
       })
       this.tool.showMessage(res,()=>{
+        this.top = true
+        this.unTop = false
         this.$emit('onSuccess')
       })
     },
@@ -82,7 +86,7 @@ export default {
       this.unTop = true
     }
   },
-  created() {
+ /* created() {
     console.log("输出置顶情况")
     console.log(this.data.isontop)
     if (this.data.isontop === 0){
@@ -92,7 +96,7 @@ export default {
       this.top = false
       this.unTop = true
     }
-  }
+  }*/
 }
 
 </script>

+ 9 - 2
src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

@@ -18,9 +18,16 @@
       <p class="normal-margin" style="color:#888;">编码:&emsp;{{selectProduct.itemno}}</p>
       <p class="normal-margin">价格:&emsp;<span class="product-price">¥{{selectProduct.gradeprice}}</span>&nbsp;<span class="text-throughline">¥{{selectProduct.marketprice}}</span></p>
       <div class="line normal-margin"></div>
+      <p class="normal-margin">型号:&emsp;{{selectProduct.model}}</p>
       <div>
         <p class="normal-margin">规格:&emsp;{{selectProduct.spec}}</p>
       </div>
+      <div>
+        <p class="normal-margin">标准:&emsp;{{selectProduct.standards}}</p>
+      </div>
+      <div>
+        <p class="normal-margin">材质:&emsp;{{selectProduct.material}}</p>
+      </div>
       <div class="flex-align-center" style="margin-bottom:30px">
         <p>数量:&emsp;</p>
         <el-input-number v-model="count" :min="selectProduct.orderminqty" :step="selectProduct.orderaddqty" size="small" label="描述文字"></el-input-number>
@@ -32,10 +39,10 @@
           <span v-else>{{selectProduct.stockstatus}}</span>
         </span>
       </div>
-      <p class="normal-margin">当前型号:&emsp;{{selectProduct.model}}</p>
+
       <div class="type">
         <div class="content normal-margin">
-          <p class="inline-16">更多规格:</p>
+          <p class="inline-16">更多:</p>
           <el-tag class="inline-16" style="margin-top: 5px;margin-bottom: 5px" @click="typeClick(item)" v-for="(item,index) in detail" :key="index" size="small" :effect="selectProduct.itemno == item.itemno ? 'dark' : 'plain'">
             {{item.model.length >20?item.model.substring(0,19)+'...':item.model}}
           </el-tag>

+ 167 - 0
src/template/invoiceCanUseProduct/index.vue

@@ -0,0 +1,167 @@
+<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": 20221114170003,
+        "content": {
+          "sa_orderid":0 ,
+          "where":{
+            "condition":""
+          }
+        }
+      },
+      tableSelectData:[],
+      tableData: [],
+      total:0,
+      currentPage:0
+    }
+  },
+  components:{
+    uploadFile,
+    previewImage
+  },
+  methods:{
+    async listData () {
+      this.params.content.sa_orderid = this.data.sa_orderid
+      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;
+}
+</style>

+ 2 - 1
src/template/selectSaler/index.vue

@@ -119,7 +119,8 @@ export default {
       this.$emit('selectRow',row)
     },
     searchQuery(){
-      this.customParam.content.where.condition = this.search
+      /*this.customParam.content.where.condition = this.search*/
+      this.param.content.where.condition = this.search
       this.listData()
     }
   },

+ 2 - 2
vue.config.js

@@ -14,8 +14,8 @@ module.exports = {
       port: 8000,
       proxy: {
         '/apis': {
-          // target: 'http://61.164.207.46:8000',  // target host*/
-          target: 'https://122.226.136.204:8079/',  // target host
+          target: 'http://61.164.207.46:8000',  // target host*/
+          // target: 'https://122.226.136.204:8079/',  // target host
           // target: 'localhost:8080',  // target host
           ws: true,  // proxy websockets 
           changeOrigin: true,  // needed for virtual hosted sites