浏览代码

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

# Conflicts:
#	src/SManagement/sales_forecast/modules/project.vue
qymljy 2 年之前
父节点
当前提交
b5287228ed

+ 6 - 1
src/Form/accountclass/add.vue

@@ -17,11 +17,16 @@
               <el-input v-model="form.accountname" placeholder="账户名称"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="10">
+          <el-col :span="12">
             <el-form-item  >
               <el-checkbox :true-label="1" :false-label="0" v-model="form.isorder" checked="checked">允许订货</el-checkbox>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item  >
+              <el-checkbox :true-label="1" :false-label="0" v-model="form.isused" checked="checked">是否启用</el-checkbox>
+            </el-form-item>
+          </el-col>
         </el-form>
       </el-row>
       <div class="dialog-footer">

+ 1 - 3
src/Form/accountclass/edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-button  size="mini" :type="btnType?btnType:'text'" @click="onShow">编 辑</el-button>
-    <el-dialog title="编 辑" :visible.sync="dialogFormVisible" width="500px">
+    <el-dialog title="编 辑" :visible.sync="dialogFormVisible" width="500px" append-to-body>
       <div slot="title" style="font-size: 15px">
         修改账户类型
       </div>
@@ -66,7 +66,6 @@ export default {
   methods:{
     onShow(){
       this.dialogFormVisible = true
-      this.$store.dispatch('queryArealist')
       this.form = Object.assign({},this.form,this.data)
       console.log(this.form)
     },
@@ -81,7 +80,6 @@ export default {
         })
         this.tool.showMessage(res,()=>{
           this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
           this.dialogFormVisible = false
         })
       })

+ 3 - 0
src/HDrpManagement/ProductMag/modules/edit.vue

@@ -452,6 +452,9 @@ export default {
         },
       })
       this.form = Object.assign({},this.form,res.data)
+      this.form.tradefields = this.form.tradefield.map(e=>{
+        return e.tradefield
+      })
       fn?fn():''
     },
     // 查询领域

+ 10 - 0
src/HDrpManagement/accountclass/index.vue

@@ -16,18 +16,28 @@
         </div>
       </template>
       <template v-slot:tbOpreation="scope">
+        <edit :data="scope.data.data" @onSuccess="onSuccess"></edit>
       </template>
     </basicLayout>
   </div>
 </template>
 
 <script>
+import edit from '@/Form/accountclass/edit.vue'
 export default {
   name: "index",
   data() {
     return {
       options:[]
     }
+  },
+  components:{
+    edit
+  },
+  methods:{
+    onSuccess () {
+      this.$refs['list'].listData()
+    }
   }
 }
 </script>

+ 25 - 1
src/HDrpManagement/orderManage/details/index.vue

@@ -17,6 +17,7 @@
         @onEditSuccess="queryMainData($route.query.id)">
         <div slot="customOperation" class="inline-16">
           <el-button v-if="tool.checkAuth($route.name,'examine')" :disabled="mainData.status !== '提交'" type="primary" size="mini" @click="onSubmit('审核')">审 核</el-button>
+          <el-button v-if="tool.checkAuth($route.name,'examine')" :disabled="mainData.status !== '审核'" type="primary" size="mini" @click="onReturnCheck">反审核</el-button>
           <el-button v-if="tool.checkAuth($route.name,'reback')" :disabled="mainData.status !== '提交'" type="primary" size="mini" @click="dialogVisible = true">退 回</el-button>
           <el-button v-if="tool.checkAuth($route.name,'submit')" :disabled="mainData.status !== '新建'"  type="primary" size="mini" @click="onSubmit('提交')">提 交</el-button>
           <el-button v-if="tool.checkAuth($route.name,'close')" :disabled="mainData.status !== '审核'" type="primary" size="mini" @click="closeOrder">关 闭</el-button>
@@ -116,7 +117,7 @@ export default {
         type: 'warning'
       }).then(async () => {
         const res = await this.$api.requested({
-          "id": type === '审核'?20221108153502:20221108153402,
+          "id": type === '审核'?20221108153502:20230102141502,
           "content": {
               "sa_orderid": this.mainData.sa_orderid,
               "sys_enterpriseid": this.mainData.sys_enterpriseid,
@@ -133,6 +134,29 @@ export default {
         });          
       });
     },
+    // 提交审核订单
+    onReturnCheck () {
+      this.$confirm(`是否反审核该订单`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "id": 20230102141502,
+          "content": {
+            "sa_orderid": this.mainData.sa_orderid,
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.queryMainData()
+        })
+      }).catch((err) => {
+        this.$message({
+          type: 'info',
+          message: err
+        });          
+      });
+    },
     async onRebanck () {
       const res = await this.$api.requested({
         "id": 20221108161902,

+ 51 - 14
src/HDrpManagement/orderManage/modules/edit.vue

@@ -60,7 +60,7 @@
             <small>{{defaultData.re_info.province}}{{defaultData.re_info.city}}{{defaultData.re_info.county}}{{defaultData.re_info.address?defaultData.re_info.address:'--'}}</small>
           </div>
         </div>
-        <div style="flex:1">
+        <div style="flex:1;margin-right:10px">
           <div class="mt-10">
             <p class="normal-title inline-16">物流公司</p>
             <el-popover
@@ -98,21 +98,54 @@
             <small>快递100ID: {{defaultData.logist_info.kd100id}}</small>
           </div>
         </div>
-      </div>
-      <div class="mt-10">
-        <p class="normal-title inline-16">选择账户</p>
-      </div>
-      <div class="flex-align-center-wrap flex-between normal-margin">
-        <div class="account__panel" :class="defaultData.accountclass.sa_accountclassid === item.sa_accountclassid?'act':''" v-for="(item) in accountlist" :key="item.index" @click="defaultData.accountclass = item">
-          <p><b>¥{{tool.formatAmount(item.balance,2)}}</b></p>
-          <small>{{item.accountname}}</small>
+        <div style="flex:1">
+          <div class="mt-10">
+            <p class="normal-title inline-16">选择账户</p>
+            <el-popover
+              placement="bottom"
+              title="选择账户"
+              trigger="click"
+              v-model="visible3">
+              <el-table
+                :data="accountlist"
+                style="width: 100%"
+                size="mini">
+                <el-table-column
+                  prop="accountname"
+                  label="账户名称"
+                  width="120">
+                </el-table-column>
+                <el-table-column
+                  prop="balance"
+                  label="账户余额"
+                  width="120">
+                  <template slot-scope="scope">
+                    ¥{{tool.formatAmount(scope.row.balance,2)}}
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  label="操作"
+                  width="90">
+                  <template slot-scope="scope">
+                    <el-button type="text" @click="(defaultData.accountclass = scope.row,visible3 = false)" size="mini">选 择</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-button slot="reference" type="text" size="mini">选择其他账户</el-button>
+            </el-popover>
+          </div>
+          <div class="reveive__panel normal-margin">
+            <p><b>¥{{tool.formatAmount(defaultData.accountclass.balance,2)}}</b></p>
+            <small>{{defaultData.accountclass.accountname}}</small>
+          </div>
         </div>
       </div>
+      
       <div class="mt-10">
         <p class="normal-title inline-16">选择财务信息</p>
         <el-popover
           placement="bottom"
-          title="选择公司"
+          title="选择财务信息"
           trigger="click"
           v-model="visible2">
           <el-table
@@ -158,7 +191,7 @@
       <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">
@@ -287,7 +320,6 @@ export default {
       this.defaultData.fin_info = this.data.finance
     },
     async onSubmit() {
-      console.log(this.data)
       const res = await this.$api.requested({
         "id": 20221108111402,
         "content": {
@@ -304,10 +336,14 @@ export default {
           "typemx":this.data.typemx, //明细分类,可选
           "remarks": this.defaultData.remarks, //可选
           // "saler_hrid":this.data.saler_hrid//销售人员hrid,业务员hrid
+          "pay_enterpriseid":this.data.pay_enterpriseid,
+          "tradefield":this.data.tradefield
         },
       })
       this.tool.showMessage(res,()=>{
+        console.log(this.data)
         this.$emit('onSuccess')
+        // this.onConfirm()
         this.drawer = false
       })
     },
@@ -329,7 +365,8 @@ export default {
             return {
               sa_orderitemsid:0,
               itemid:e.itemid,
-              qty:e.orderminqty
+              qty:e.orderminqty,
+              needdate:e.deliverydate
             }
           })
         },
@@ -359,7 +396,7 @@ export default {
   color:#666
 }
 .account__panel{
-  width: calc(33% - 26px);
+  width: calc(25% - 26px);
   padding: 10px;
   margin-bottom:10px;
   border: 1px dashed #666;

+ 36 - 32
src/HDrpManagement/orderManage/modules/productlist.vue

@@ -40,22 +40,40 @@
       <el-table-column
         label="交期"
         width="200">
+        <template slot="header">
+          <div>
+            <span>交期</span>&nbsp;
+            <el-popover
+              v-if="type === 'edit'"
+              placement="bottom"
+              width="400"
+              trigger="click">
+              <el-date-picker
+                v-model="value2"
+                slot="reference"
+                align="right"
+                type="date"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-popover>
+          </div>
+        </template>
         <template slot-scope="scope">
-          <el-tooltip class="item" effect="dark" :content="`实际交期为当前选择日期+${scope.row.delivery}天`" placement="top-start">
-            <el-date-picker
-              v-if="scope.row.delivery > 0 && type === 'edit'"
-              v-model="scope.row.deliverydate"
-              type="date"
-              placeholder="选择日期"
-              value-format="yyyy-MM-dd"
-              size="mini"
-              style="width:150px"
-              :picker-options="pickerOptions"
-              @change="onDateChange(scope.row,scope.$index)">
-            </el-date-picker>
-          </el-tooltip>
-          <p v-if="scope.row.delivery === 0 ">不管控交期</p>
-          <p v-else>{{scope.row.deliverydate}}</p>
+          <el-date-picker
+            v-if="scope.row.delivery > 0 && type === 'edit'"
+            v-model="scope.row.deliverydate"
+            type="date"
+            placeholder="选择日期"
+            value-format="yyyy-MM-dd"
+            size="mini"
+            style="width:150px"
+            :picker-options="pickerOptions"
+            @change="onDateChange(scope.row)">
+          </el-date-picker>
+          <div v-else>
+            <p v-if="scope.row.delivery === 0 ">不管控交期</p>
+            <p v-else>{{scope.row.deliverydate}}</p>
+          </div>
         </template>
       </el-table-column>
       <el-table-column
@@ -126,7 +144,8 @@ export default {
       },
       total:0,
       currentPage:0,
-      time: null
+      time: null,
+      value2:''
     }
   },
   methods:{
@@ -186,23 +205,8 @@ export default {
         })
       },500)
     },
-    onDateChange (val,index){
+    onDateChange (val){
       let that = this
-
-      let date = new Date(val.deliverydate)
-      function getMyDate(str) {
-        var oDate = new Date(str),
-        oYear = oDate.getFullYear(),
-        oMonth = oDate.getMonth()+1,
-        oDay = oDate.getDate(),
-        oTime = oYear +'-'+ oMonth +'-'+ oDay
-        return oTime;
-      }
-      val.deliverydate = getMyDate(date.getTime() + 24 * 3600 * 1000 * val.delivery)
-      this.$set(this.tableData,index,val)
-
-      
-
       that.updateOrderDATE({
         "sa_orderid": this.data.sa_orderid, //订单ID
         "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID

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

@@ -21,7 +21,7 @@
         <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
       </div>
       <div slot="customOperation">
-        <examine class="inline-16" :data="mainData"  @examineSuccess="onSuccess"></examine>
+        <examine class="inline-16" v-if="tool.checkAuth($route.name,'check')" :data="mainData"  @examineSuccess="onSuccess"></examine>
         <!-- 此区域提供了自定义操作按钮 -->
 <!--        <div class="inline-16" v-if="tool.checkAuth($route.name,'receive') && mainData.freeget === 1 && length === 0 ">
           <receive  :id="mainData.sa_customersid" @onshow="show"></receive>

+ 1 - 1
src/HDrpManagement/payvoucher/details/modules/examine.vue

@@ -32,7 +32,7 @@ export default {
         return callback(new Error('确认金额不能为空'));
       }
       setTimeout(() => {
-        if (value !== this.data.amount) {
+        if (Number(value) !== this.data.amount) {
           callback(new Error('确认金额与单据金额不一致'));
         } else {
           callback();

+ 0 - 2
src/HDrpManagement/publicCustomer/modules/detail/addressManage/list.vue

@@ -75,8 +75,6 @@ export default {
     async listData(){
       this.params.content.sys_enterpriseid = this.data.sys_enterpriseid
       const res = await this.$api.requested(this.params)
-      console.log("--------------")
-      console.log(res)
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageTotal

+ 16 - 12
src/HDrpManagement/recvoucher/details/index.vue

@@ -21,7 +21,7 @@
         <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
       </div>
       <div slot="customOperation">
-        <examine class="inline-16" :data="mainData" v-if="mainData.status !== '审核'"  @examineSuccess="onSuccess"></examine>
+        <examine class="inline-16" v-if="tool.checkAuth($route.name,'check')" :data="mainData"  @examineSuccess="onSuccess"></examine>
         <!-- 此区域提供了自定义操作按钮 -->
 <!--        <div class="inline-16" v-if="tool.checkAuth($route.name,'receive') && mainData.freeget === 1 && length === 0 ">
           <receive  :id="mainData.sa_customersid" @onshow="show"></receive>
@@ -71,20 +71,20 @@ export default {
           value:this.mainData.billno
         },
         {
-          label:'单据日期',
-          value:this.mainData.createdate
-        },
-        {
-          label:'经销商',
-          value:this.mainData.enterprisename
+          label:'状态',
+          value:this.mainData.status
         },
         {
           label:'账户类型',
           value:this.mainData.accountname
         },
         {
-          label:'支出金额',
-          value:this.mainData.accountno
+          label:'经销商',
+          value:this.mainData.enterprisename
+        },
+        {
+          label:'金额',
+          value:this.mainData.amount
         },
         {
           label:'分类',
@@ -95,13 +95,17 @@ export default {
           value:this.mainData.subclass
         },
         {
-          label:'状态',
-          value:this.mainData.status
+          label:'单据日期',
+          value:this.mainData.createdate
         },
         {
           label:'备注',
           value:this.mainData.remarks
-        }
+        },
+        {
+          label:'确认金额',
+          value:this.mainData.status === '审核'?this.mainData.amount:'--'
+        },
       ]
     },
     // 监听切换数据,上一页,下一页

+ 48 - 20
src/HDrpManagement/recvoucher/details/modules/examine.vue

@@ -1,17 +1,23 @@
 <template>
   <div class="inline-16">
-    <el-button   size="mini" @click="onShow" type="primary" >审核</el-button>
+    <el-button :disabled="data.status !== '新建'" size="mini" type="primary" @click="onShow" >审核</el-button>
     <el-dialog
         title="提示"
         :visible.sync="dialogVisible"
-        width="25%"
+        width="400px"
         append-to-body
         @close="dialogVisible = false">
-      <span>确定通过此单据的审核吗?</span>
-      <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogVisible = false">取 消</el-button>
-    <el-button type="primary" @click="examineRow">确 定</el-button>
-  </span>
+        <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+          <el-form-item
+              prop="amount"
+              label="确认金额">
+              <el-input v-model="form.amount" size="small" placeholder="请输入确认金额"></el-input>
+          </el-form-item>
+        </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" style="width:120px" @click="dialogVisible = false">取 消</el-button>
+        <el-button type="warning" size="small" style="width:120px"  @click="examineRow">确 定</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -21,26 +27,48 @@ export default {
   name: "examine",
   props:["data"],
   data(){
+    var checkAmount = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('确认金额不能为空'));
+      }
+      setTimeout(() => {
+        if (Number(value) !== this.data.amount) {
+          callback(new Error('确认金额与单据金额不一致'));
+        } else {
+          callback();
+        }
+      }, 1000);
+    };
     return {
-      dialogVisible:false
+      dialogVisible:false,
+      form:{
+        amount:''
+      },
+      rules:{
+        amount: [
+          { validator: checkAmount, trigger: 'blur',require:true },
+        ],
+      }
     }
   },
   methods:{
     onShow(){
-      console.log(this.data)
       this.dialogVisible = true
     },
-    async examineRow(){
-      const res = await this.$api.requested({
-        "id": "20221009103103",
-        "version":1,
-        "content": {
-          "sa_cashbillid":this.data.sa_cashbillid
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.dialogVisible = false
-        this.$emit("examineSuccess")
+    examineRow(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false;
+        const res = await this.$api.requested({
+          "id": "20221009103103",
+          "version":1,
+          "content": {
+            "sa_cashbillid":this.data.sa_cashbillid
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.dialogVisible = false
+          this.$emit("examineSuccess")
+        })
       })
     },
   }

+ 0 - 1
src/SDrpManagement/ProductGroup/index.vue

@@ -85,7 +85,6 @@ export default {
       console.log(this.productGroup);
     },
     itemClick(id) {
-      this.$store.dispatch('changeDetailDrawer',true)
       this.$router.push({
         path:'/groupDetail',
         query: {

+ 18 - 7
src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

@@ -21,11 +21,18 @@
       <div class="type">
         <div class="content normal-margin">
           <p class="inline-16">更多型号:</p>
-          <el-tag class="inline-16" @click="typeClick(item)" v-for="(item,index) in detail" :key="index"
-            :style="selectProduct.itemno == item.itemno ? 'background:#2b3e68;color:#ffffff' : ''" size="small">{{item.model}}
+          <el-tag class="inline-16" @click="typeClick(item)" v-for="(item,index) in detail" :key="index" size="small" :effect="selectProduct.itemno == item.itemno ? 'dark' : 'plain'">{{item.model}}
           </el-tag>
         </div>
       </div>
+      <div class="type">
+        <div class="content normal-margin">
+          <p class="inline-16">领域:</p>
+          <el-tag class="inline-16" @click="actTradefield = item.tradefield" v-for="(item,index) in tradefield" :key="index" size="small" :effect="actTradefield === item.tradefield ? 'dark' : 'plain'">{{item.tradefield}}
+          </el-tag>
+        </div>
+      </div>
+      
       <el-button class="normal-margin" type="primary" style="width:200px" icon="el-icon-shopping-cart-full" @click="addCart">加入购物车</el-button>
       <div style="display:flex">
         <p>相关链接:&emsp;</p>
@@ -48,7 +55,9 @@ export default {
       detail: '',
       count: 1,
       selectProduct: '',
-      actImage:{}
+      actImage:{},
+      tradefield:[],
+      actTradefield:''
     };
   },
   computed: {
@@ -70,16 +79,17 @@ export default {
       this.detail = res.data
       this.selectProduct = this.detail ? this.detail[0] : ''
       this.actImage = this.detail ? this.detail[0].attinfos[0] : {}
-      console.log(this.selectProduct);
-
+      this.tradefield  = this.detail ? this.detail[0].tradefield : []
+      this.actTradefield = this.detail[0].tradefield[0].tradefield
+      console.log(this.actTradefield)
     },
     countChange (num) {
       this.count = num
     },
     typeClick (data) {
-      console.log(data)
       this.selectProduct = data
       this.actImage = data.attinfos[0]
+      this.actTradefield = data.tradefield[0].tradefield
       this.count = 1
     },
     
@@ -90,7 +100,8 @@ export default {
           "sa_brandid": this.$route.query.brandid, //品牌id
           "itemid": this.selectProduct.itemid, //货品id
           "qty": this.count, //数量
-          "itemno": this.selectProduct.itemno //货品编号
+          "itemno": this.selectProduct.itemno, //货品编号
+          "tradefield":this.actTradefield
         },
       })
       this.tool.showMessage(res)

+ 13 - 4
src/SDrpManagement/shopCart/modules/confirmOrder.vue

@@ -336,8 +336,9 @@ export default {
       this.financiallist = res.data
       this.defaultData.fin_info = res.data[0]
     },
+
+    // 提交订单
     async onSubmit() {
-      
       const res = await this.$api.requested({
         "id": 20221128183202,
         "content": {
@@ -346,16 +347,24 @@ export default {
           "sa_logiscompid": this.defaultData.logist_info.sa_logiscompid, //物流公司档案ID
           "rec_contactsid": this.defaultData.re_info.contactsid, //合作企业联系人表ID(收货信息)
           "remarks": this.defaultData.remarks, //可选
+          "tradefield":this.data[0].tradefield_shoppingcart,
           "items": this.data.map(e=>{
-            e.sa_orderitemsid = 0
-            return e
+            return {
+              "sa_orderitemsid": 0, //写死0
+              "itemid": e.itemid, //商品ID
+              "sa_brandid": e.sa_brandid,
+              "qty": e.qty //数量
+            }
           })
         },
       })
       this.tool.showMessage(res,()=>{
+        
         this.drawer = false
       })
-    }
+    },
+
+    // 交期待确认交期
   },
   mounted () {
     // this.receiveAddress()

+ 17 - 0
src/SDrpManagement/shopCart/modules/list.vue

@@ -74,6 +74,15 @@
           <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.gradeprice * scope.row.qty,2)}}</p>
         </template>
       </el-table-column>
+      <el-table-column
+        prop="tradefield_shoppingcart"
+        label="品牌/领域"
+        width="150">
+        <template slot-scope="scope">
+          <el-tag size="mini" type="primary" effect="dark">{{scope.row.brandname}}</el-tag>&nbsp;
+          <el-tag size="mini" type="primary" effect="dark">{{scope.row.tradefield_shoppingcart}}</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column width="90">
         <template slot-scope="scope">
           <slot name="del" :data="scope.row"></slot>
@@ -140,6 +149,14 @@ export default {
     },
     selectionChange (val) {
       this.tableSelectData = val
+      let _isbrandSame = this.tableSelectData.some(item=>item.sa_brandid !== this.tableSelectData[0].sa_brandid)
+
+      if (_isbrandSame) return this.$message({message:"当前存在不同品牌产品请检查",type:'error'})
+
+      let _isFieldSame = this.tableSelectData.some(item=>item.tradefield_shoppingcart !== this.tableSelectData[0].tradefield_shoppingcart)
+
+       if (_isFieldSame) return this.$message({message:"当前存在不同领域产品请检查",type:'error'})
+
       this.$emit('selection',val)
     },
     clearSelection () {

+ 0 - 267
src/SManagement/sales_forecast/index copy.vue

@@ -1,267 +0,0 @@
-<template>
-  <div class="sales">
-    <div class="container normal-panel">
-      <p class="normal-title normal-margin">预测提报任务</p>
-      <div class="header-handle">
-        <Search @searchActive="searchActive" @clearData="clearData" />
-        <DownSelect @selectChange="categoryChange" @clearCategory="clearCategory" title="提报要求:"
-          :list="[{label:'按产品类别预测',value:'0'},{label:'按项目及产品类别预测',value:'1'}]" style="margin-right:16px" />
-      </div>
-      <tableLayout v-if="salesPanelList" :layout="tablecols" :data="salesPanelList" :custom="true" height="30vh"
-        @rowClick="rowClick" fixedName="operation">
-        <template v-slot:customcol="scope">
-          <div v-if="scope.column.columnname == 'periodtype'">
-            <span>
-              {{scope.column.data.periodpoint | timer(scope.column.data[scope.column.columnname])}}
-            </span>
-          </div>
-          <div v-else-if="scope.column.columnname == 'baseonproject'">
-            <span v-if="scope.column.data[scope.column.columnname] == '1'">按项目及产品类别预测</span>
-            <span v-else>按产品类别预测</span>
-          </div>
-          <div v-else-if="scope.column.columnname == 'date'">
-            <span>{{scope.column.data.begdate}}至{{scope.column.data.enddate}}</span>
-          </div>
-          <div v-else-if="scope.column.columnname == 'status'">
-            <span :style="scope.column.data[scope.column.columnname] == '发布' ? 'color: rgb(82, 196, 26)' : ''">{{scope.column.data[scope.column.columnname]}}</span>
-          </div>
-          <span v-else>{{scope.column.data[scope.column.columnname]}}</span>
-        </template>
-        <template v-slot:opreation="scope">
-          <el-button type="text" size="small" @click="addBuill(scope)"
-            v-if="tool.checkAuth($route.name,'create_sales')" :disabled="scope.data.status == '结束' || new Date().valueOf() > new Date(scope.data.enddate).valueOf()">创建提报</el-button>
-        </template>
-      </tableLayout>
-      <pagination :total="total" :pageSize="params.content.pageSize" :currentPage="params.content.pageNumber"
-        @pageChange="pageChange" style="margin-top:16px;display:flex;justify-content: flex-end;">
-      </pagination>
-    </div>
-    <div class="container normal-panel" style="margin-top:16px">
-      <p class="normal-title normal-margin">销售预测记录</p>
-      <div class="header-handle">
-        <Search @searchActive="searchActive2" @clearData="clearData2" />
-        <time-select @clearSelect="clearTime" @timeChange="timeChange" title="提报时间:"></time-select>
-      </div>
-      <tableLayout :layout="tablecols2" :data="historyList" :custom="true" height="30vh">
-        <template v-slot:customcol="scope">
-          <div v-if="scope.column.columnname == 'periodtype'">
-            <span>
-              {{scope.column.data.periodpoint | timer(scope.column.data[scope.column.columnname])}}
-            </span>
-          </div>
-          <div v-else-if="scope.column.columnname == 'baseonproject'">
-            <span v-if="scope.column.data[scope.column.columnname] == '1'">按项目及产品类别预测</span>
-            <span v-else>按产品类别预测</span>
-          </div>
-          <span v-else>{{scope.column.data[scope.column.columnname]}}</span>
-        </template>
-        <template v-slot:opreation="scope">
-          <el-button type="text" size="small" @click="goDetail(scope.data)"
-            v-if="tool.checkAuth($route.name,'read') && scope.data.isoverdue == 1">详情</el-button>
-          <el-button type="text" size="small" @click="goEdit(scope.data)"
-            v-else-if="tool.checkAuth($route.name,'update') && scope.data.isoverdue == 0">编辑</el-button>
-        </template>
-      </tableLayout>
-    </div>
-
-  </div>
-</template>
-
-<script>
-import Header from '@/SManagement/archives_upload/components/Header'
-import Search from '@/components/search/index'
-import DownSelect from '@/components/down_select/index'
-import TimeSelect from '@/SManagement/submitedit_one/components/TimeSelect'
-import Pagination from '@/components/pagination/Pagination'
-import { log } from '@antv/g2plot/lib/utils'
-export default {
-  name: '',
-  data () {
-    return {
-      params: {
-        "id": 20220906154403,
-        "version": 1,
-        "content": {
-          "nocache": true,
-          "pageNumber": 1,
-          "pageSize": 12,
-          "where": {
-            "condition": "",
-            "baseonproject": "",
-            "begindate": '',
-            "enddate": ''
-          }
-        }
-      },
-      /* 销售模板list */
-      salesPanelList: '',
-      /* 当前选中的模板id */
-      selectPanelId: '',
-      /* 提报记录数据 */
-      historyList: [],
-      tablecols: '',
-      tablecols2: '',
-      total: 0,
-      /* 开始时间 */
-      begindate: '',
-      /* 结束时间 */
-      enddate: '',
-      condition:''
-    };
-  },
-  components: { Header, Search, DownSelect, TimeSelect, Pagination },
-  computed: {
-  },
-  watch: {
-  },
-  filters: {
-    timer (val, type) {
-      if (type == '月') {
-        return '每月' + val.substr(1, val.length - 2) + '日'
-      } else {
-        return '每周' + val.substr(1, val.length - 2)
-      }
-    }
-  },
-  created () {
-    this.getSalesPanel()
-    this.tablecols = this.tool.tabelCol(this.$route.name).SalesPanelTable.tablecols
-    this.tablecols2 = this.tool.tabelCol(this.$route.name).salesHistoryTable.tablecols
-  },
-  methods: {
-    /* 获取销售预测模板 */
-    async getSalesPanel () {
-      let res = await this.$api.requested(this.params)
-      this.salesPanelList = res.data
-      this.total = res.total
-      this.historyList = []
-      console.log(res);
-    },
-    /* 获取提报记录数据 */
-    async getSalesDetail () {
-      let res = await this.$api.requested({
-        "id": 20220908134403,
-        "version": 1,
-        "content": {
-          "nocache": true,
-          "sa_salesforecastmodelid": this.selectPanelId,
-          "where": {
-            "begindate": this.begindate,
-            "enddate": this.enddate,
-            "condition":this.condition
-          }
-        }
-      })
-      this.historyList = res.data
-      console.log(this.historyList);
-    },
-    async rowClick (data) {
-      this.selectPanelId = data.sa_salesforecastmodelid
-      this.getSalesDetail()
-
-    },
-    /* 创建提报 */
-    async addBuill (data) {
-      if(data.data.status == '结束') return 
-      let res = await this.$api.requested({
-        "id": 20220913154403,
-        "version": 1,
-        "content": {
-          "sa_salesforecastmodelid": data.data.sa_salesforecastmodelid,
-          "sa_salesforecastbillid": 0,
-          "sa_projectids": data.data.baseonproject == 1 ? [] : [0]
-        }
-      })
-      if (res.code == 0) {
-        this.$notify({
-          title: '提示',
-          message: res.msg,
-          type: 'warning'
-        })
-      } else {
-        console.log(res);
-        this.$router.push({ path: data.data.baseonproject == 1 ? '/edit_sales' : '/edit_product', query: { id: res.data[0].sa_salesforecastbillid, id2: data.data.sa_salesforecastmodelid, header: 'panel' } })
-      }
-    },
-    /* 前往详情页 */
-    goDetail (data) {
-      if (data.baseonproject == 0) {
-        this.$router.push({ path: '/product_detail', query: { id: data.sa_salesforecastbillid } })
-      } else {
-        this.$router.push({ path: '/project_detail', query: { id: data.sa_salesforecastbillid, type: 'product' } })
-      }
-    },
-    /* 前往编辑页 */
-    goEdit (data) {
-      /* 跳转到产品编辑页 */
-      if (data.baseonproject == 0) {
-        this.$router.push({ path: '/edit_product', query: { id: data.sa_salesforecastbillid, id2: data.sa_salesforecastmodelid } })
-        /* 跳转到项目编辑页 */
-      } else {
-        this.$router.push({ path: '/edit_sales', query: { id: data.sa_salesforecastbillid, id2: data.sa_salesforecastmodelid, type: 'project' } })
-      }
-    },
-    pageChange (n) {
-      this.params.content.pageNumber = n
-      this.getSalesPanel()
-    },
-    /* 模板搜索 */
-    searchActive (data) {
-      this.params.content.where.condition = data
-      this.params.content.pageNumber = 1
-      this.getSalesPanel()
-    },
-    /* 模板清除搜索 */
-    clearData () {
-      this.params.content.where.condition = ''
-      this.params.content.pageNumber = 1
-      this.getSalesPanel()
-    },
-    /* 提报搜索 */
-    searchActive2 (data) {
-      this.condition = data
-      this.params.content.pageNumber = 1
-      this.getSalesDetail()
-    },
-    /* 提报清除搜索 */
-    clearData2 () {
-      this.condition = ''
-      this.params.content.pageNumber = 1
-      this.getSalesDetail()
-    },
-    /* 清除分类 */
-    clearCategory () {
-      this.params.content.where.baseonproject = ''
-      this.params.content.pageNumber = 1
-      this.getSalesPanel()
-    },
-    /* 分类改变 */
-    categoryChange (data) {
-      console.log(222);
-      this.params.content.where.baseonproject = data
-      this.params.content.pageNumber = 1
-      this.getSalesPanel()
-    },
-    /* 时间赛选改变 */
-    timeChange (time) {
-      this.begindate = time[0]
-      this.enddate = time[1]
-      this.getSalesDetail()
-    },
-    /* 清除时间赛选 */
-    clearTime () {
-      this.begindate = ''
-      this.enddate = ''
-      this.getSalesDetail()
-    },
-  },
-};
-</script>
-
-<style scoped>
-.sales .header-handle {
-  display: flex;
-  align-items: center;
-  margin-bottom: 16px;
-}
-</style>

+ 3 - 4
src/SManagement/sales_forecast/modules/project.vue

@@ -63,6 +63,7 @@ export default {
     return {
       param:{
         "id": 20220916115203,
+        "version":1,
         "content": {
           "pageNumber":1,
           "pageSize":20,
@@ -72,7 +73,7 @@ export default {
           }
         }
       },
-      act_row:{},
+      act_row:null,
       list:[],
       currentPage:0,
       total:0,
@@ -81,13 +82,11 @@ export default {
   },
   methods:{
     async listData () {
-      console.log(this.$route.query.id)
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
-      console.log(res,"项目")
-      this.$emit('queryProduct',res.data[0].sa_projectid)
+      this.$emit('queryProduct',this.act_row?this.act_row:res.data[0].sa_projectid)
     },
     async deleteProject (row) {
       const res = await this.$api.requested({

+ 1 - 1
src/components/newLayout/modules/header.vue

@@ -129,7 +129,7 @@ export default {
   },
   mounted () {
     this.siteInfos()
-    this.getWeather()
+    // this.getWeather()
     
     this.accountInfo = JSON.parse(sessionStorage.getItem('active_account'))
     this.accountList = JSON.parse(sessionStorage.getItem('account_list')).filter(e=>{

+ 0 - 1
src/utils/basic-data.js

@@ -27,7 +27,6 @@ function getEnterpriseList () {
         }
     },
   }).then(res=>{
-    
     enterpriseList = res.data
   })
 }