瀏覽代碼

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

qymljy 2 年之前
父節點
當前提交
cfbb218f23

+ 7 - 2
src/HDrpManagement/logisticcom/modules/add.vue

@@ -13,8 +13,10 @@
           <el-form :model="form" :rules="rules" ref="form" label-width="85px" label-position="right" size="mini">
             <el-col :span="24">
               <el-form-item label="企业名称:" prop="enterprisename">
-                <!-- <el-input v-model="form.enterprisename" placeholder="输入企业名称"></el-input> -->
-                <enterprise ref="ent" @rowClick="rowClick"></enterprise>
+                <div class="flex-align-center">
+                  <el-input class="inline-16" v-model="form.enterprisename" @change="inputChange" placeholder="输入企业名称"></el-input>
+                  <enterprise showType="button"  ref="ent" @rowClick="rowClick"></enterprise>
+                </div>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -76,6 +78,9 @@ export default {
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
       
     },
+    inputChange () {
+      this.form.sa_logiscompid = 0
+    },
     rowClick (row) {
       this.form = Object.assign({},this.form,row)
     },

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

@@ -387,7 +387,7 @@ export default {
         "content": {
           "sa_orderid":this.mainData.sa_orderid,
           "sa_orderitemsids": this.selection.map(e=>{
-            return e.itemid
+            return e.sa_orderitemsid
           })
         }
       })

+ 1 - 0
src/HDrpManagement/serveBill/modules/detail.vue

@@ -146,6 +146,7 @@ export default {
         {label:'经销商编号',value:this.mainData.agentnum ? this.mainData.agentnum : ''},
         {label:'经销商',value:this.mainData.enterprisename ? this.mainData.enterprisename : ''},
         {label:'省市县',value:`${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`},
+        {label:'地址',value:this.mainData.address ? this.mainData.address : ''},
         {label:'关联订单',value:this.mainData.sonum ? this.mainData.sonum : ''},
         {label:'服务分类',value:this.mainData.servicetype ? this.mainData.servicetype : ''},
         {label:'服务联系人',value:this.mainData.scenecontact ? this.mainData.scenecontact : ''},

+ 2 - 1
src/SDrpManagement/agentOrder/details/index.vue

@@ -15,7 +15,7 @@
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
         <div slot="customOperation" class="inline-16">
-          <Edit class="inline-16" v-if="tool.checkAuth($route.name,'update') && mainData.status == '新建'" :data="mainData" @onSuccess="queryMainData();$refs.prod.listData()" />
+          <Edit class="inline-16" v-if="tool.checkAuth($route.name,'update') && mainData.status == '新建'" :data="mainData" @onSuccess="queryMainData();$refs.prod && $refs.prod.listData()" />
           <el-button :disabled="mainData.status !== '交期待确认'"  type="primary" size="mini" @click="confirmdate">确认交期</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,'insert')"  type="primary" size="mini" @click="onCopy">复 制</el-button>
@@ -98,6 +98,7 @@ export default {
         const res = await this.$api.requested({
           "id":'20221108151302',
           "content": {
+            "nocache":true,
             "sa_orderid": this.$route.query.id
           }
         })

+ 5 - 1
src/SDrpManagement/agentOrder/index.vue

@@ -10,7 +10,8 @@
       :oldFormPath="{add:'SDrpManagement/agentOrder/modules'}"
       :detailPath="{
         path:'/agent_orderDetails'
-      }">
+      }"
+      @listCreate="list">
       <div slot="custom" style="display:flex">
         <div class="label_center">
           <p class="search__label">订单状态:</p>
@@ -71,6 +72,9 @@ export default {
     }
   },
   methods:{
+    list (param) {
+      param.content.nocache = true
+    }
   }
 }
 

+ 11 - 5
src/SDrpManagement/agentOrder/modules/edit.vue

@@ -9,7 +9,7 @@
     size="80%">
     <div slot="title">
       <div class="flex-align-center">
-        <p ><span style="font-size:14px">订单合计:</span><span style="color:red;font-size:16px;"><b>¥&nbsp;{{tool.formatAmount(data.amount,2)}}</b></span></p>
+        <p ><span style="font-size:14px">订单合计:</span><span style="color:red;font-size:16px;"><b>¥&nbsp;{{tool.formatAmount(data.defaultamount,2)}}</b></span></p>
         <!-- <label style="font-size:14px;margin-left:10px" for="">备注:</label>
         <input class="order__note__input" v-model="defaultData.remarks" type="text" placeholder="请输入订单备注"> -->
 <!--        <p>运费:{{data.amount > data.freefreightamount >= 0?'当前订单免运费':`订单满${data.freefreightamount}元免运费,当前还差${data.freefreightamount - data.amount}元`}}</p>-->
@@ -38,7 +38,7 @@
           <div class="flex-align-center">
             <p class="inline-16"><small>账户余额:&nbsp;</small><b>¥{{tool.formatAmount(defaultData.accountclass.balance?defaultData.accountclass.balance:0,2)}}</b></p>
             <p class="inline-16"><small>账户名称:&nbsp;</small>{{defaultData.accountclass.accountname?defaultData.accountclass.accountname:'未选择账户'}}</p>
-            <p><small>本单金额:&nbsp;</small>{{tool.formatAmount(data.amount - rebateamount,2)}}</p>
+            <p><small>本单金额:&nbsp;</small>{{data.rebate_used ? tool.formatAmount(data.defaultamount - rebateamount,2) : data.defaultamount}}</p>
           </div>
           <div v-if="(data.type === '标准订单' ||  data.type === '特殊订单') && isusedrebate === 1">
             <el-checkbox v-model="data.rebate_used" :true-label="1" :false-label="0" @change="rebateUsedChange">使用返利金</el-checkbox>
@@ -278,7 +278,11 @@ export default {
       this.selectOptions()
 
       this.checked = this.data.rebate_used
-      this.rebateamount = this.data.rebateamount
+      if (this.data.rebateamount > this.data.defaultamount) {
+        this.rebateamount = this.tool.formatAmount(+this.data.defaultamount / 2)
+      } else {
+        this.rebateamount = this.data.rebateamount
+      }
     },
     // 收货信息:合作企业联系人
     async receiveAddress (fn) {
@@ -330,7 +334,7 @@ export default {
           "pay_enterpriseid":this.data.pay_enterpriseid,
           "tradefield":this.data.tradefield,
           "saletype":this.saletype,
-          "rebate_used":this.checked,//默认0,是否使用返利金
+          "rebate_used":this.data.rebate_used,//默认0,是否使用返利金
           "signbacknum":'',
           "sa_promotionid":this.data.sa_promotionid,
           "billdate":this.data.billdate
@@ -339,7 +343,7 @@ export default {
       this.tool.showMessage(res,()=>{
         this.$emit('onSuccess')
         if (this.data.type === '标准订单' ||  this.data.type === '特殊订单') {
-          this.isusedrebate === 1?this.useRebate():""
+          this.isusedrebate === 1?this.useRebate(this.data.rebateamount):""
         }
         this.drawer = false
       })
@@ -389,6 +393,8 @@ export default {
               }
             })
       if(res.data=='成功'){
+        this.$emit('onSuccess')
+        this.initPage()
         if(rebateamount>amount){
           this.data.rebateamount=amount
           this.$message({

+ 26 - 36
src/SDrpManagement/agentOrder/modules/productlist.vue

@@ -46,25 +46,32 @@
       </el-table-column>
       
       <el-table-column
-        prop="price"
-        label="价"
+        prop="defaultprice"
+        label="价"
         width="90">
         <template slot-scope="scope">
-          <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.price,2)}}</p>
+          <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.defaultprice,2)}}</p>
+        </template>
+      </el-table-column>
+        <el-table-column
+        label="金额"
+        width="150">
+        <template slot-scope="scope">
+          <p style="color:red;font-weight:500">¥&nbsp;{{scope.row.defaultamount}}</p>
         </template>
       </el-table-column>
       <el-table-column
-        label="折后价格"
-        prop="totalprice">
+        label="折后价"
+        prop="price">
         <template slot-scope="scope">
           <p style="color:red;font-weight:500">¥&nbsp;{{scope.row.price}}</p>
         </template>
       </el-table-column>
       <el-table-column
-        label="小计"
+        label="折后金额"
         width="150">
         <template slot-scope="scope">
-          <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.price * scope.row.qty,2)}}</p>
+          <p style="color:red;font-weight:500">¥&nbsp;{{scope.row.amount}}</p>
         </template>
       </el-table-column>
       <el-table-column
@@ -119,36 +126,17 @@
           <el-tag size="mini" type="info" effect="plain">{{scope.row.unit}}</el-tag>
         </template>
       </el-table-column>
+     
       <el-table-column
-        prop="price"
-        label="价格"
-        width="90">
+        prop="remarks"
+        label="备注"
+        width="300"
+        fixed="right">
         <template slot-scope="scope">
-          <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.defaultprice,2)}}</p>
+          <el-input type="textarea"  @blur="onConfirm([scope.row],true)" size="small" v-model="scope.row.remarks" placeholder="请输入备注"></el-input>
         </template>
       </el-table-column>
-      <el-table-column
-        label="折后单价"
-        prop="totalprice">
-        <template slot-scope="scope">
-          <p style="color:red;font-weight:500">¥&nbsp;{{Math.round(scope.row.price * 100)/100}}</p>
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="小计"
-        width="150">
-        <template slot-scope="scope">
-          <p style="color:red;font-weight:500">¥&nbsp;{{scope.row.defaultamount}}</p>
-        </template>
-      </el-table-column>
-      <el-table-column
-          label="折后总价"
-          width="150">
-        <template slot-scope="scope">
-          <p style="color:red;font-weight:500">¥&nbsp;{{scope.row.amount}}</p>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="data.status === '新建'" width="90" fixed="right">
+       <el-table-column v-if="data.status === '新建'" width="90" fixed="right">
         <template slot-scope="scope">
           <el-button type="text" size="mini" @click="deleteOrderProduct(scope.row)">删 除</el-button>
         </template>
@@ -209,6 +197,7 @@ export default {
     addProduct
   },
   methods:{
+
     async listData () {
       this.param.content.sa_orderid = this.$route.query.id
       const res = await this.$api.requested(this.param)
@@ -319,7 +308,7 @@ export default {
       }
     },
     // 订单添加商品
-    async onConfirm (data) {
+    async onConfirm (data,edit) {
       const res = await this.$api.requested({
         "id": 20221109093602,
         "content": {
@@ -328,10 +317,11 @@ export default {
           "type": this.data.type, //订单类型
           "items": data.map(e=>{
             return {
-              sa_orderitemsid:0,
+              sa_orderitemsid:edit?e.sa_orderitemsid : 0,
               itemid:e.itemid,
               qty:e.orderminqty,
-              needdate:e.deliverydate
+              needdate:e.deliverydate,
+              remarks:e.remarks
             }
           })
         },

+ 11 - 14
src/SDrpManagement/salerOrder/modules/add.vue

@@ -26,7 +26,7 @@
                 <el-input readonly v-model="form.type" placeholder="订单类型" :maxlength="11" clearable :style="{width: '100%'}"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="12" v-if="form.type !== '项目订单'">
+            <el-col :span="form.type==='工具订单'?24:12" v-if="form.type !== '项目订单'">
               <el-form-item label="选择经销商" prop="sys_enterpriseid">
                 <agent ref="enterprise" ismanage="0" @rowClick="rowClick"></agent>
               </el-form-item>
@@ -184,19 +184,16 @@ export default {
   methods:{
     async handleCommand (command) {
       this.form.type = command
-      if (command === '工具订单') {
-        const res = await this.$api.requested({
-          "id": 20221108111402,
-          "content":this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.$store.dispatch('changeDetailDrawer',true)
-          this.$router.push({path:'/orderdetail',query:{id:res.data.sa_orderid,rowindex:res.data.rowindex}})
-        })
-      } else {
-        this.drawer = true
-        this.specordermx()
-      }
+      const res = await this.$api.requested({
+        "id": 20221108111402,
+        "content":this.form
+      })
+      // this.tool.showMessage(res,()=>{
+      //   this.$store.dispatch('changeDetailDrawer',true)
+      //   this.$router.push({path:'/orderdetail',query:{id:res.data.sa_orderid,rowindex:res.data.rowindex}})
+      // })
+      this.drawer = true
+      this.specordermx()
      
     },
     submitForm() {

+ 3 - 1
src/components/upload/hw_obs_upload.vue

@@ -89,6 +89,7 @@ export default {
   },
   methods: {
     handleChange (file, filelist) {
+      console.log(file)
       this.filelist = filelist
       var index = file.raw.name.lastIndexOf(".");
       var ext = file.name.substr(index + 1);
@@ -108,7 +109,8 @@ export default {
     },
 
     // 上传到华为云
-    async upoladFileToServer (url, file, ext, obsfilename) {      
+    async upoladFileToServer (url, file, ext, obsfilename) {   
+      console.log(file)   
       let THIS = this
       let config = {
         headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : ext === 'svg'?{ 'Content-Type': 'image/svg+xml' } : { 'Content-Type': 'application/octet-stream' },

+ 3 - 2
src/template/enterprise/index.vue

@@ -50,7 +50,8 @@
           </el-pagination>
         </div>
       </div>
-      <el-input readonly :validate-event="false" slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives"  placeholder="输入经销商信息" clearable></el-input>
+      <el-button v-if="showType === 'button'"  slot="reference" type="primary" size="mini" @click="queryEnterpriseArchives">选择企业</el-button>
+      <el-input v-else readonly :validate-event="false" slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives"  placeholder="输入经销商信息" clearable></el-input>
     </el-popover>
   </div>
 </template>
@@ -61,7 +62,7 @@ export default {
   components:{
     addTemp
   },
-  props:['type','qiyi'],
+  props:['type','qiyi','showType'],
   data () {
     return {
       ENlist:[],

+ 1 - 1
vue.config.js

@@ -14,7 +14,7 @@ module.exports = {
       port: 8000,
       proxy: {
         '/apis': {
-          /*target: 'http://61.164.207.46:8000',  // target host*/
+          // target: 'http://61.164.207.46:8000',  // target host*/
             target: 'http://122.226.136.204:8082/',  // target host
           // target: 'localhost:8080',  // target host
           ws: true,  // proxy websockets