zhangqiOMG 3 лет назад
Родитель
Сommit
c46d8a9f1e

+ 3 - 2
src/Form/QuotedPrice/edit.vue

@@ -243,7 +243,7 @@
         <el-divider></el-divider>
       </div>
       <div style="margin:30px 20px 20px 20px">
-        <quoted_price_product :id="form.sa_projectid" ref="quoterPrice" @checkForm="onSubmit" @totalPrice="queryTotalPrice"></quoted_price_product>
+        <quoted_price_product :id="form.sa_projectid" ref="quoterPrice" @checkForm="onSubmit" @queryTotalPrice="queryTotalPrice"></quoted_price_product>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
@@ -366,7 +366,8 @@ export default {
     onShow(){
       this.drawer = true
       console.log(this.data,"报价单")
-      this.form = this.data
+      // this.form = this.data
+      this.form = Object.assign({},this.form,this.data)
       this.date[0] = this.form.begdate
       this.date[1] = this.form.enddate
       if (this.form.quotedpricetype === '项目报价'){

+ 1 - 0
src/HDrpManagement/orderManage/modules/defaultInfo.vue

@@ -11,6 +11,7 @@
       <el-descriptions-item label="税号">{{ mainData.finance?mainData.finance.taxno:"--" }}</el-descriptions-item>
       <el-descriptions-item label="开户行">{{ mainData.finance?mainData.finance.bank:"--" }}</el-descriptions-item>
       <el-descriptions-item label="开户账号">{{ mainData.finance?mainData.finance.bankcardno:"--" }}</el-descriptions-item>
+      <el-descriptions-item label="开户地址">{{ mainData.finance?mainData.finance.address:"--" }}</el-descriptions-item>
     </el-descriptions>
     <el-descriptions class="normal-margin"  border :column="2" labelClassName="my-label" contentClassName="my-content">
       <div slot="title" class="my-label__title">收货信息</div>

+ 392 - 1
src/HDrpManagement/orderManage/modules/edit.vue

@@ -1,12 +1,403 @@
 <template>
-  <div></div>
+  <div>
+    <el-button type="primary" size="mini" @click="onShow(drawer = true)">编辑</el-button>
+    <el-drawer
+    :visible.sync="drawer"
+    direction="rtl"
+    append-to-body
+    size="50%">
+    <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>
+        <label style="font-size:14px;margin-left:10px" for="">备注:</label>
+        <input class="order__note__input" v-model="defaultData.remarks" type="text" placeholder="请输入订单备注">
+      </div>
+    </div>
+    <div class="drawer__panel">
+      <div class="flex-align-center normal-margin">
+        <div style="flex:1;margin-right:10px">
+          <div class="mt-10">
+            <p class="normal-title inline-16">收货信息</p>
+            <el-popover
+              placement="bottom"
+              title="选择地址"
+              trigger="click"
+              v-model="visible">
+              <el-table
+                :data="receiveAddresslist"
+                style="width: 100%"
+                size="mini">
+                <el-table-column
+                  prop="name"
+                  label="联系人"
+                  width="90">
+                </el-table-column>
+                <el-table-column
+                  prop="phonenumber"
+                  label="电话"
+                  width="120">
+                </el-table-column>
+                <el-table-column
+                  label="地址"
+                  width="360">
+                  <template slot-scope="scope">
+                    {{scope.row.province}}{{scope.row.city}}{{scope.row.county}}{{scope.row.address}}
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  label="操作"
+                  width="90">
+                  <template slot-scope="scope">
+                    <el-button type="text" @click="(defaultData.re_info = scope.row,visible = 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><span class="inline-16"><b>{{defaultData.re_info.name}}</b></span><small>{{defaultData.re_info.phonenumber}}</small></p>
+            <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 class="mt-10">
+            <p class="normal-title inline-16">物流公司</p>
+            <el-popover
+              placement="bottom"
+              title="选择公司"
+              trigger="click"
+              v-model="visible1">
+              <el-table
+                :data="logisticcomlist"
+                style="width: 100%"
+                size="mini">
+                <el-table-column
+                  prop="abbreviation"
+                  label="公司简称"
+                  width="120">
+                </el-table-column>
+                <el-table-column
+                  prop="kd100id"
+                  label="快递100ID"
+                  width="120">
+                </el-table-column>
+                <el-table-column
+                  label="操作"
+                  width="90">
+                  <template slot-scope="scope">
+                    <el-button type="text" @click="(defaultData.logist_info = scope.row,visible1 = 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><span class="inline-16"><b>{{defaultData.logist_info.abbreviation}}</b></span></p>
+            <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.account_index === index?'act':''" v-for="(item,index) in accountlist" :key="item.index" @click="defaultData.account_index = index">
+          <p><b>¥{{tool.formatAmount(item.balance,2)}}</b></p>
+          <small>{{item.accountname}}</small>
+        </div>
+      </div>
+      <div class="mt-10">
+        <p class="normal-title inline-16">选择财务信息</p>
+        <el-popover
+          placement="bottom"
+          title="选择公司"
+          trigger="click"
+          v-model="visible2">
+          <el-table
+            :data="financiallist"
+            style="width: 100%"
+            size="mini">
+            <el-table-column
+              prop="enterprisename"
+              label="公司抬头"
+              width="120">
+            </el-table-column>
+            <el-table-column
+              prop="address"
+              label="开票地址"
+              width="120">
+            </el-table-column>
+            <el-table-column
+              prop="bank"
+              label="开户行"
+              width="120">
+            </el-table-column>
+            <el-table-column
+              prop="bankcardno"
+              label="开户账号"
+              width="120">
+            </el-table-column>
+            <el-table-column
+              label="操作"
+              width="90">
+              <template slot-scope="scope">
+                <el-button type="text" @click="(defaultData.fin_info = scope.row,visible2 = 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><small>抬头:&nbsp;</small><span class="inline-16"><b>{{defaultData.fin_info.enterprisename}}</b></span></p>
+        <p><small>开票地址:&nbsp;</small>{{defaultData.fin_info.address}}</p>
+        <p><small>开户行:&nbsp;</small> {{defaultData.fin_info.bank}} &emsp;<small>开户账号:&nbsp;</small> {{defaultData.fin_info.bankcardno}}</p>
+      </div>
+      <div class="mt-10">
+        <p class="normal-title">订单产品</p>
+      </div>
+      <div style="border:1px solid #f1f2f3">
+        <el-table
+          ref="multipleTable"
+          :data="data"
+          style="width: 100%;"
+          :header-cell-style="{height:'50px',color:'#768093',fontWeight:'400'}"
+          :cell-style="{height:'50px',color:'#768093',fontWeight:'400'}">
+          <!-- <el-table-column
+            type="selection"
+            width="55"
+            align="center">
+          </el-table-column> -->
+          <el-table-column
+            align="center"
+            label="产品图"
+            width="80">
+            <template slot-scope="scope">
+              <previewImage class="image" :image="scope.row.attinfos[0]" :list="scope.row.attinfos" :deletebtn="false"></previewImage>
+            </template>
+          </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>&nbsp;/&nbsp;<span>{{scope.row.spec}}</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="数量"
+            width="150">
+            <template slot-scope="scope">
+            <el-input-number size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" :step="scope.row.orderaddqty" label="输入数量" @change="qtyChange"></el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="unit"
+            label="计量单位"
+            width="90">
+            <template slot-scope="scope">
+              <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="gradeprice"
+            label="价格"
+            width="90">
+            <template slot-scope="scope">
+              <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.gradeprice,2)}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="小计"
+            width="150">
+            <template slot-scope="scope">
+              <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 width="90">
+            <template slot-scope="scope">
+              <slot name="del" :data="scope.row"></slot>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="fixed__btn__panel">
+      <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
+      <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">保存修改</el-button>
+    </div>
+  </el-drawer>
+  </div>
 </template>
 
 <script>
+import previewImage from '@/components/previewImage/index.vue'
+
 export default {
+  props:['data'],
+  components:{
+    previewImage
+  },
+  data () {
+    return {
+      visible:false,
+      visible1:false,
+      visible2:false,
+      drawer:false,
+      receiveAddresslist:[],
+      accountlist:[],
+      logisticcomlist:[],
+      financiallist:[],
+      defaultData:{
+        re_info:{},
+        logist_info:{},
+        fin_info:{},
+        account_index:0
+      },
+      agnetInfo:{},
+      total:0
+    }
+  },
+  methods:{
+    onShow () {
+      this.queryAgentiInfo()
+    },
+    async queryAgentiInfo () {
+      const res = await this.$api.requested({
+        "id": "20221022165203",
+        "content": {}
+      })
+      this.agnetInfo = res.data
+
+      this.receiveAddress()
+
+      this.queryAccount()
+
+      this.queryLogisticcom()
+
+      this.queryFinancial()
+    },
+    // 收货信息:合作企业联系人
+    async receiveAddress () {
+      const res = await this.$api.requested({
+        "id": "20221009155803",
+        "content": {
+        "sys_enterpriseid":this.agnetInfo.sys_enterpriseid,
+          "where":{
+            "condition":"",
+            "workaddress":0
+          }
+        }
+      })
+      this.receiveAddresslist = res.data
+      this.defaultData.re_info = res.data[0]
+    },
+
+    // 账号信息
+    async queryAccount () {
+      const res = await this.$api.requested({
+        "id": "20221008134803",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 100
+        }
+      })
+      this.accountlist = res.data
+    },
 
+    // 物流企业
+    async queryLogisticcom () {
+      const res = await this.$api.requested({
+        "id": "20221121135804",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 100
+        }
+      })
+      this.logisticcomlist = res.data
+      this.defaultData.logist_info = res.data[0]
+    },
+    // 财务信息
+    async queryFinancial () {
+      const res = await this.$api.requested({
+        "id": "20221013160602",
+        "content": {
+          "sys_enterpriseid":this.agnetInfo.sys_enterpriseid,
+          "pageNumber": 1,
+          "pageSize": 100
+        }
+      })
+      this.financiallist = res.data
+      this.defaultData.fin_info = res.data[0]
+    },
+    qtyChange () {},
+    async onSubmit() {
+      const res = await this.$api.requested({
+        "id": 20221128183202,
+        "content": {
+          "sa_accountclassid": this.accountlist[this.defaultData.account_index].sa_accountclassid, //营销账户类型ID
+          "sys_enterprise_financeid": this.defaultData.fin_info.sys_enterprise_financeid, //合作企业财务信息ID(开票信息)
+          "sa_logiscompid": this.defaultData.logist_info.sa_logiscompid, //物流公司档案ID
+          "rec_contactsid": this.defaultData.re_info.contactsid, //合作企业联系人表ID(收货信息)
+          "remarks": this.defaultData.remarks, //可选
+          "items": this.data.map(e=>{
+            e.sa_orderitemsid = 0
+            return e
+          })
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.drawer = false
+      })
+    }
+  },
+  mounted () {
+  }
 }
 
 </script>
 <style>
+</style>
+<style scoped>
+.reveive__panel{
+  font-size: 14px;
+  line-height: 30px;
+  padding: 10px;
+  background: #d9ecff;
+  border: 1px dashed #0676e7;
+}
+.account__panel small,.reveive__panel small{
+  color:#666
+}
+.account__panel{
+  width: calc(33% - 26px);
+  padding: 10px;
+  margin-bottom:10px;
+  border: 1px dashed #666;
+}
+.act{
+  background: #d9ecff;
+  border: 1px dashed #0676e7;
+}
+.image {
+  width:40px;height:40px;margin:0px auto;
+}
+.order__note__input{
+  border: none;
+  outline: none;
+  /* margin-left: 10px; */
+  /* border-bottom: 1px solid #f1f2f3; */
+  flex:1
+}
 </style>

+ 2 - 2
src/HDrpManagement/orderManage/modules/productlist.vue

@@ -41,7 +41,7 @@
         label="计量单位"
         width="90">
         <template slot-scope="scope">
-          <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}</el-tag>
+          <el-tag size="mini" type="info" effect="plain">{{scope.row.unit}}</el-tag>
         </template>
       </el-table-column>
       <el-table-column
@@ -49,7 +49,7 @@
         label="价格"
         width="90">
         <template slot-scope="scope">
-          <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.gradeprice,2)}}</p>
+          <p style="color:red;font-weight:500">¥&nbsp;{{tool.formatAmount(scope.row.price,2)}}</p>
         </template>
       </el-table-column>
       <el-table-column

+ 1 - 1
src/HDrpManagement/projectChange/modules/modules/andEnterprise/components/add.vue

@@ -44,7 +44,7 @@ import enterprise from './enterprise'
 export default {
   name: "add",
   props:["data"],
-  inject:["enterpriseType"],
+  // inject:["enterpriseType"],
   components:{enterprise},
   data(){
     return {

+ 2 - 2
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -223,8 +223,8 @@ export default {
         this.list[i].discountrate = this.list[i].discountrate * 100
         totalPrice = totalPrice + this.list[i].qty * this.list[i].price
       }
-      this.$emit("totalPrice",totalPrice)
-      console.log(this.list,'产品配置信息')
+      this.$emit("queryTotalPrice",totalPrice)
+      console.log(this.list,totalPrice,'产品配置信息')
     },
     /*产品配置信息*/
     async productData(id){

+ 1 - 1
src/components/normal-basic-layout/details/modules/tabs/tab.vue

@@ -61,7 +61,7 @@ export default {
     }
   },
   mounted () {
-    // this.queryAttments()
+    if (!this.tabs) return this.activeName = 'file'
   },
   watch: {
     activeName (val) {

+ 163 - 0
src/template/orderCanUseProduct/index.vue

@@ -0,0 +1,163 @@
+<template>
+<div class="container"> 
+  <div class="flex-align-center flex-between normal-margin">
+    <slot name="operation"></slot>
+    <div class="flex-align-center">
+      <el-input 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>&nbsp;
+    </div>
+  </div>
+  <div class="produtMag-panel">
+    <el-table
+      ref="multipleTable"
+      :data="tableData"
+      style="width: 100%"
+      :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
+      :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+      @selection-change="selectionChange">
+      <el-table-column
+        type="selection"
+        width="55">
+      </el-table-column>
+      <el-table-column
+        align="center"
+        label="产品图"
+        width="80">
+        <template slot-scope="scope">
+          <div v-if="scope.row.attinfos[0]">
+            <previewImage class="image" :image="scope.row.attinfos[0]" :list="scope.row.attinfos" :deletebtn="false"></previewImage>
+          </div>
+        </template>
+      </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="型号/规格">
+        <template slot-scope="scope">
+          <p><span>{{scope.row.model}}</span>&nbsp;/&nbsp;<span>{{scope.row.spec}}</span></p>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="unitid"
+        label="起订量/增量"
+        width="150">
+        <template slot-scope="scope">
+          <p><span>{{scope.row.orderminqty}}</span>&nbsp;/&nbsp;<span>{{scope.row.orderaddqty}}</span></p>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="unitid"
+        label="计量单位"
+        width="90">
+        <template slot-scope="scope">
+          <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="status"
+        label="状态"
+        width="90">
+        <template slot-scope="scope">
+          <span :style="scope.row.status === '新建'?{color:'#52C41A'}:{color:'red'}">{{scope.row.status}}</span>
+        </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 {
+  data () {
+    return {
+      params:{
+        "id": 20221109153502,
+        "content": {
+            "sa_orderid": 2, //订单ID
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+                "condition": ""
+            }
+        },
+      },
+      tableSelectData:[],
+      tableData: [],
+      total:0,
+      currentPage:0
+    }
+  },
+  components:{
+    uploadFile,
+    previewImage
+  },
+  methods:{
+    async listData () {
+      const res = await this.$api.requested(this.params)
+      this.tableData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    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
+      this.$emit('selectionChange',val)
+    },
+    clearSelection () {
+      this.$refs.multipleTable.clearSelection();
+    }
+  },
+  mounted () {
+    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>