Browse Source

代码上传

zhangqiOMG 2 years ago
parent
commit
8472108801

+ 3 - 0
src/HDrpManagement/dispatch/details/index.vue

@@ -16,6 +16,7 @@
       <div slot="tags">
       </div>
       <div slot="customOperation">
+        <add class="inline-16"/>
         <Edit class="inline-16" v-if="tool.checkAuth($route.name,'update') && mainData.STATUS == '新建'" :data="mainData" @onSuccess="onSuccess" />
         <el-button type="primary" size="mini"  v-if="tool.checkAuth($route.name,'cancelBill')" :disabled="mainData.STATUS !== '复核'" @click="cancelBill">手工关闭</el-button>
         <el-button type="primary" size="mini"  v-if="tool.checkAuth($route.name,'check')" :disabled="mainData.STATUS !== '新建' && mainData.STATUS !== '审核'" @click="onCheck">{{mainData.STATUS === '审核'?'反审':mainData.STATUS === '复核'?'反审':'审核'}}</el-button>
@@ -36,6 +37,7 @@
 
 <script>
 import Edit from '../modules/edit'
+import add from '../modules/add'
 import productList from '../modules/productlist.vue'
 import erpInfo from '../modules/erpInfo.vue'
 import defaultInfo from '../modules/defaultInfo.vue'
@@ -48,6 +50,7 @@ import defaultInfo from '../modules/defaultInfo.vue'
       }
     },
     components:{
+      add,
       Edit,
       productList,
       defaultInfo,

+ 13 - 0
src/HDrpManagement/dispatch/index.vue

@@ -12,6 +12,7 @@
       :apiId="{query:20221114135403,del:20221114135503}"
       :fixRightData="['remarks']"
       :fixLeftData="['billno','status']"
+      :autoQuery="autoQuery"
       :detailPath="{
         path:'/dispatchdetail'
       }">
@@ -90,6 +91,7 @@
   export default {
     data () {
       return {
+        autoQuery:true,
         options:[],
         dateSelect:[],
         value:'',
@@ -128,6 +130,17 @@
           return '';
         }
       }
+    },
+    created () {
+      if (this.$route.query.id){
+        this.autoQuery = false
+      }
+    },
+    mounted () {
+      if (this.$route.query.id){
+        this.$refs.basicLayout.param.content.where.sa_orderitemsid = this.$route.query.id
+        this.$refs.basicLayout.listData()
+      }
     }
   }
 

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

@@ -9,7 +9,7 @@
         <tableLayout :layout="tablecols" checkbox="true"  :data="tableData" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true" fixedName="offerPrice amount" @selectionChange="handleSelectionChange">
           <template v-slot:customcol="scope">
             <p v-if="scope.column.columnname == 'qty'">
-              <el-input-number :controls="true" controls-position='right' v-if="data.STATUS === '新建'" size="mini" v-model="scope.column.data.qty" label="输入数量" @change="rowChange(scope.column.data,scope.column.index)" :precision="2"></el-input-number>
+              <el-input-number :controls="true" controls-position='right' v-if="data.STATUS === '新建'" size="mini" v-model="scope.column.data.qty" label="输入数量" @change="rowChange(scope.column.data,scope.column.index,scope.column.data.batchno = '')" :precision="2"></el-input-number>
               <span v-else>{{scope.column.data.qty}}</span>
             </p>
             <p v-else-if="scope.column.columnname == 'batchno'">
@@ -249,7 +249,8 @@ export default {
       const res = await this.$api.requested({
         "id": "20230427101303",
         "content": {
-          "itemnos":[row.itemno]
+          "itemnos":[row.itemno],
+          "qty":row.qty
         }
       })
       this.options = res.data

+ 3 - 3
src/HDrpManagement/dispatchMx/index.vue

@@ -5,7 +5,8 @@
       ref="basicLayout"
       tableName="dispatchMxTable"
       :apiId="{query:20230508113003}"
-      :options="options">
+      :options="options"
+      :autoQuery="autoQuery">
       <template #custom>
         <div class="mt-10">
           <label class="search__label" >单据日期:</label>
@@ -74,6 +75,7 @@
 export default {
   data () {
     return {
+      autoQuery:true,
       options:[],
       tradefieldList:'',
       where: {
@@ -112,8 +114,6 @@ export default {
       this.$router.push({path:'/dispatchdetail',query:{id:id,changePage:0}})
     }
   },
-  created () {
-  }
 }
 
 </script>

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

@@ -14,6 +14,7 @@
         </el-option>
       </el-select>
       <el-button size="small" @click="reloadParam">重 置</el-button>
+      <el-button size="small" @click="addAll">添加全部产品</el-button>
     </div>
     <el-button type="primary" size="small" :disabled="tableSelectData.length === 0" @click="onConfirm">添加选中产品</el-button>
   </div>
@@ -166,6 +167,15 @@ export default {
       this.total = res.total
       this.currentPage = res.pageNumber
     },
+    async addAll () {
+      this.params.content.isall = true
+      const res = await this.$api.requested(this.params)
+      res.data = res.data.filter(e=>{
+        e.qty = e.orderminqty
+        return e
+      })
+      this.$emit('onConfirm',res.data,true)
+    },
     handlePullApi (pullApi) {
       pullApi.content = JSON.parse(JSON.stringify(this.params.content))
       pullApi.id = JSON.parse(JSON.stringify(this.params.id))

+ 30 - 7
src/HDrpManagement/orderManage/details/tabs/productlist.vue

@@ -5,18 +5,20 @@
         <slot name="operation"></slot>
         <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>
         <excel style="margin:0 0 10px 10px" :tablecols="columnTitle" :param="param" :total="total" :excelTitle="excelTitle"></excel>
+        <el-input  style="width:200px;margin:0 0 10px 10px" placeholder="根据商品/品号搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition"
+                   @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+        </el-input>
         <el-tooltip class="item" effect="dark" content="输入整单折扣,订单行进行计算,回车保存" placement="top-start">
           <el-input :disabled="data.status !== '新建' && data.status !== '预提交'" v-if="tool.checkAuth($route.name,'quickDiscountrate')" v-model.number="discountrate" size="small" style="width:200px;margin:0 0 10px 10px" type="number" :min="0" :max="1" placeholder="输入折扣" @change="discountrateValidate" @keydown.enter.native="quickDiscountrate"></el-input>
         </el-tooltip>
         <el-button style="margin:0 0 10px 10px" type="text" size="small" @click="reloadPrice" class="inline-16">重置价格</el-button>
-        <el-input  style="width:200px;" placeholder="根据商品/品号搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition"
-                   @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
-        </el-input>
+        <el-button style="margin:0 0 10px 10px" type="text" size="small" @click="changeSort">未发降序</el-button>
       </div>
       <el-table
         v-loading="loading"
         ref="multipleTable"
         :data="tableData"
+        :row-class-name="tableClassNamed"
         size="small"
         max-height="500px"
         stripe
@@ -232,6 +234,9 @@ export default {
           "sa_orderid": 0, //订单ID
           "pageNumber": 1,
           "pageSize": 20,
+          "sort":[
+           
+          ],
           "where": {
             "condition": ""
           }
@@ -270,7 +275,6 @@ export default {
       this.total = res.total
       this.totalPage = Math.ceil(this.total /200)
       this.currentPage = res.pageNumber
-      this.queryBasicInfo()
       if (this.selectNumber[this.param.content.pageNumber -1]){
         this.$refs.multipleTable.toggleRowSelection(this.tableData[3])
       }
@@ -406,7 +410,7 @@ export default {
       })
        if (res.code == 1) {
         this.$emit('onSuccess')
-        this.listData()
+        // this.listData()
       } else {
         this.$message({
           message:res.data + ':' + res.msg,
@@ -454,6 +458,10 @@ export default {
     },
     // 订单添加产品
     async onConfirm (data,isupload) {
+      const loading = this.$loading({
+        lock: true,
+        text: '数据插入中...',
+      });
       if (isupload) {
         const res = await this.$api.requested({
           "id": 20221109093602,
@@ -471,10 +479,12 @@ export default {
             })
           },
         })
+        loading.close();
       }
       this.listData()
       this.$emit('onSuccess')
       this.$refs.addpro.tableSelectData = []
+      this.$refs.addpro.listData()
     },
     async queryStock (val) {
       const res = await this.$api.requested({
@@ -575,12 +585,22 @@ export default {
       this.drawer = false
       // this.$refs.addpro.params.content.where.condition = ''
       // this.$refs.addpro.params.content.where.isonsale = ''
+    },
+    tableClassNamed ({row,rowIndex}) {
+      if (row.undeliqty > 0) {
+        return 'bg-red';
+      } else {
+        return '';
+      }
+    },
+    changeSort(){
+      this.param.content.sort = [{sortname: "默认", sorted: 1, sortid: 146, reversed: 0}]
+      this.listData()
     }
-
   },
   mounted () {
     this.listData()
-    // this.queryStock()
+    this.queryBasicInfo()
     this.columnTitle  = []
     this.$refs.multipleTable.$children.forEach(obj => {
 
@@ -598,4 +618,7 @@ export default {
 body .el-table th.gutter{
 display: table-cell!important;
 }
+.bg-red{
+  color:red !important;
+}
 </style>

+ 7 - 1
src/HDrpManagement/orderManage/modules/add.vue

@@ -70,7 +70,8 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12"  v-if="form.type !=='工具订单' && form.type !=='项目订单' && form.typemx !== '工程' && form.typemx !== '电商'">
+            <el-col :span="12"  v-if="form.type !=='工具订单' && form.type !=='项目订单' && form.typemx !== '工程' && form.typemx !== '电商' &&
+            agentnum !== '2314' && agentnum !== '2315'">
               <el-form-item label="选择领域" prop="tradefield">
                 <el-select :disabled="form.type==='促销订单'" v-model="form.tradefield" placeholder="请选择选择领域" clearable :style="{width: '100%'}">
                   <el-option v-for="(item, index) in tradefieldOptions" :key="index" :label="item.value"
@@ -107,6 +108,7 @@ export default {
       drawer:false,
       visible:false,
       visible1:false,
+      agentnum:'',
       form:{
         "sa_orderid": 0,
         "sys_enterpriseid": '', //订货企业id,可不传,默认取当前账号的
@@ -219,6 +221,7 @@ export default {
         })
         this.tool.showMessage(res,()=>{
           this.drawer = false
+          this.agentnum = ''
           this.$store.dispatch('changeDetailDrawer',true)
           this.$router.push({path:'/orderdetail',query:{id:res.data.sa_orderid,rowindex:res.data.rowindex}})
         })
@@ -230,6 +233,7 @@ export default {
     },
     resetForm() {
       this.$refs['form'].resetFields()
+      this.agentnum = ''
     },
     async pageData () {
       const res = await this.$api.requested({
@@ -261,6 +265,8 @@ export default {
       })
     },
     rowClick (row) {
+      console.log(row,'企业选择')
+      this.agentnum = row.agentnum
       this.form.sys_enterpriseid = row.sys_enterpriseid
       this.form.type === '促销订单'?this.$refs['activity'].listData(row.sys_enterpriseid):''
       // this.form.type === '促销订单'?this.activityClick({}):''

+ 6 - 0
src/HDrpManagement/orderMx/index.vue

@@ -104,6 +104,9 @@
         <div v-else-if="scope.data.column.columnname == 'isfreeze'">
           <span>{{scope.data.column.data.isfreeze == 1?'是':'否'}}</span>
         </div>
+        <div v-else-if="scope.data.column.columnname == 'Fh'">
+          <el-button type="text" size="small" @click="toFHbill(scope.data.column.data.sa_orderitemsid)">发货单明细</el-button>
+        </div>
         <div v-else>
           {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}
         </div>
@@ -156,6 +159,9 @@ export default {
       this.$store.dispatch('changeDetailDrawer',true)
       this.$router.push({path:'/orderdetail',query:{id:id}})
     },
+    toFHbill (id) {
+       this.$router.push({path:'/dispatch',query:{id:id}})
+    },
     /*筛选排序*/
     handleCommand(command){
       let sort = [

+ 1 - 1
yos/index.html

@@ -1 +1 @@
-<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.e428fee0.js"></script><script defer="defer" type="module" src="js/app.405b82be.js"></script><link href="css/app.795f71b7.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.0beef1e9.js" nomodule></script><script defer="defer" src="js/app-legacy.00f82300.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body><head><meta http-equiv="pragma" content="no-cache"></head></html>
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.e428fee0.js"></script><script defer="defer" type="module" src="js/app.5cc949cf.js"></script><link href="css/app.795f71b7.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.0beef1e9.js" nomodule></script><script defer="defer" src="js/app-legacy.5bc43116.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body><head><meta http-equiv="pragma" content="no-cache"></head></html>