jlutt@163.com 3 vuotta sitten
vanhempi
commit
8fda0cd258

+ 10 - 0
src/api/order/orderDetail.js

@@ -82,6 +82,16 @@ export function updatePrintOrder(data) {
     data: data
   })
 }
+
+export function getPrintOrderInfo(data) {
+  return request({
+    url: '/order/getPrintOrderInfo',
+    method: 'post',
+    params: data
+  })
+}
+
+
 // 编辑并提交印刷订单
 export function editAndCommitPrintOrder(data) {
   return request({

+ 3 - 86
src/components/orderDetail/orderDetail.vue

@@ -574,14 +574,7 @@
 
 <script>
 import {
-  readOrderDetail4DeliverInform,
-  readOrderDetail4OrderInfo,
-  readOrderDetail4OrderPart,
-  readOrderDetail4OrderProduceInfo,
-  readOrderDetail4OrderStockItem,
-  readOrderDetail4OutAssisBill, readOrderDetail4SendBillItem,
-  readPrintOrderDetail,
-  readPrintOrderDetailCraftInfo
+  getPrintOrderInfo
 } from '@/api/order/orderDetail'
 import OrderStep from "@/components/orderStep/orderStep";
 import {getOrderPDFFiles} from "@/api/printbill/printbill";
@@ -596,8 +589,7 @@ export default {
   components: {
     OrderStep,
     printStep,
-    machinefList,
-    PrintbillDetail: () => import('@/components/printbillDetail/printbillDetail')
+    machinefList
   },
   data() {
     return {
@@ -676,85 +668,10 @@ export default {
       var data = {
         'idOrder': _that.idOrder
       }
-      readOrderDetail4OrderInfo(data).then(res => {
+      getPrintOrderInfo(data).then(res => {
         _that.activeName = 'first'
         _that.form = res.data
         document.title = _that.form.orderCode + '_订单详情'
-        var payKinds = []
-        var payKind = []
-        payKind = _that.form.payKind.split('+')
-        payKind.forEach(item => {
-          var kindItem = item.split(':')
-          payKinds.push(kindItem)
-        })
-        _that.payKind = payKinds
-      })
-
-      readOrderDetail4DeliverInform(data).then(res => {
-        _that.deliverInform = res.data
-      })
-
-      readOrderDetail4OrderPart(data).then(res => {
-        _that.partInfoList = res.data
-      })
-
-      readOrderDetail4OrderProduceInfo(data).then(res => {
-        _that.produceInfoList = res.data
-        _that.printBillCode = ''
-        let tmpCode = ''
-        const tmpArray = []
-        res.data.forEach(function(item) {
-          if (!tmpArray.includes(item.printBillCode)) {
-            tmpArray.push(item.printBillCode)
-            if (tmpCode === '') {
-              tmpCode = item.printBillCode;
-            } else {
-              tmpCode = tmpCode + ',' + item.printBillCode;
-            }
-          }
-        })
-        _that.printBillCode = tmpCode
-      })
-
-      readOrderDetail4OutAssisBill(data).then(res => {
-        _that.outAssistBillList = res.data
-      })
-
-      readOrderDetail4OrderStockItem(data).then(res => {
-        _that.orderStockItemList = res.data
-      })
-
-      readOrderDetail4SendBillItem(data).then(res => {
-        _that.sendBillItemList = res.data
-      })
-
-      // readPrintOrderDetail(data).then(res => {
-      //   _that.activeName = 'first'
-      //   _that.form = res.data
-      //   document.title = _that.form.orderCode + '_订单详情'
-      //   var payKinds = []
-      //   var payKind = []
-      //   payKind = _that.form.payKind.split('+')
-      //   payKind.forEach(item => {
-      //     var kindItem = item.split(':')
-      //     payKinds.push(kindItem)
-      //   })
-      //   _that.payKind = payKinds
-      // })
-    },
-    // 判断权限
-    checkPermission(permissionStr) {
-      const _that = this
-      var data = {
-        permission: permissionStr
-      }
-      ifPermission(data).then(res => {
-        // console.log(res)
-        if (res.data == 1) {
-          if (permissionStr == 'order:orderMoneyTotal:admin') {
-            _that.permissionFlag1 = true
-          }
-        }
       })
     },
     getCraftInfo() {

+ 0 - 31
src/views/baseInfo/client/clientList.vue

@@ -42,7 +42,6 @@
           <el-button @click="editStatus(row.id,'1')" v-else="row.enable==0" size="mini">
             启用
           </el-button>
-          <el-button size="mini" @click="carEditOrderAddr(row.id,row.clientName)" type="primary">配置收货地址</el-button><br>
           </template>
           <template v-else>
             <el-button @click="chooseThis(row)" type="primary" size="mini">
@@ -67,18 +66,6 @@
         label="客户名称">
       </el-table-column>
       <el-table-column
-        prop="industryName"
-        label="所属行业">
-      </el-table-column>
-      <el-table-column
-        prop="levelName"
-        label="客户级别">
-      </el-table-column>
-      <el-table-column
-        prop="payMode"
-        label="付款方式">
-      </el-table-column>
-      <el-table-column
         prop="contactMan"
         label="联系人">
       </el-table-column>
@@ -96,16 +83,6 @@
           <span>{{row.province+row.city+row.area+row.address}}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        align="left"
-        class-name="status-col"
-        width="280"
-        label="欠款额度(元)">
-        <template slot-scope="{row}">
-          <span>{{row.overdraftQuota*0.01}}</span>
-        </template>
-      </el-table-column>
-
     </el-table>
     <pagination
 v-show="listData.total>0"
@@ -618,14 +595,6 @@ export default {
       this.listData.page = 1
       this.getTableInfo()
     },
-    carEditOrderAddr(id, name) {
-      this.$refs.address.outerVisible = true
-      this.$refs.address.idClient = id
-      this.$refs.address.clientName = name
-      var pageNum = 1
-      this.$refs.address.getInfo(pageNum, '')
-      this.$refs.address.searchVal = ''
-    },
     getAdress(adr) {
       // console.log(adr);
       // this.defaultAddress = adr;

+ 1 - 38
src/views/baseInfo/client/components/customerDetail.vue

@@ -11,8 +11,7 @@
 
     <div style="clear: both"></div>
 
-    <div
-class="el-page-header"
+    <div class="el-page-header"
          style="padding-bottom: 10px; border-bottom: 1px solid rgb(221, 221, 221); margin-bottom: 20px;">
       <div class="el-page-header__content">{{title}}</div>
     </div>
@@ -20,42 +19,6 @@ class="el-page-header"
     <el-form :model="ruleForm" label-width="130px" :rules="rules" ref="ruleForm" label-position="right">
       <el-row :gutter="20">
         <el-col :span="8">
-          <el-form-item prop="industryName" label="行业信息">
-            <el-select v-model="ruleForm.industryName" placeholder="请选择">
-              <el-option
-                v-for="item in industryList"
-                :key="item.id"
-                :label="item.industryName"
-                :value="item.industryName+','+item.id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="levelName" label="客户等级">
-            <el-select v-model="ruleForm.levelName" placeholder="请选择">
-              <el-option
-                v-for="item in levelList"
-                :key="item.id"
-                :label="item.levelName"
-                :value="item.levelName+','+item.id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="payMode" label="付款方式">
-            <el-select v-model="ruleForm.payMode" placeholder="请选择">
-              <el-option
-                v-for="item in paytypeList"
-                :key="item.id"
-                :label="item.payMode"
-                :value="item.payMode+','+item.id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
           <el-form-item prop="clientName" label="客户名称">
             <el-input v-model="ruleForm.clientName"></el-input>
           </el-form-item>

+ 81 - 591
src/views/doc/client/clientList.vue

@@ -3,7 +3,8 @@
     <addressdny @getAdress="getAdress" ref="address"></addressdny>
     <div class="filter-container">
 
-      <el-input size="mini" @input="searchData()" v-model="search.keyWord" placeholder="关键字" style="width: 200px;" class="filter-item" @keyup.enter.native="searchData"/>
+      <el-input size="mini" @input="searchData()" v-model="search.keyWord" placeholder="关键字" style="width: 200px;"
+                class="filter-item" @keyup.enter.native="searchData"/>
       <el-button size="mini" class="filter-item" type="primary" icon="el-icon-search" @click="searchData">
         搜索
       </el-button>
@@ -18,6 +19,8 @@
         @click="$router.push({path:'/doc/createCustomer'})">
         增加客户
       </el-button>
+      <el-checkbox v-if="!isChoose" size="mini" @change="checkDisable" v-model="disableLock" label="已禁用"
+                   border></el-checkbox>
       <el-button type="primary" size="mini" icon="el-icon-refresh" @click="getTableInfo">刷新</el-button>
     </div>
     <el-table
@@ -30,7 +33,8 @@
       :size="!webType || isChoose ? 'mini':''"
       border
       default-expand-all>
-      <el-table-column label="操作" align="center" :width="webType&&!isChoose?'360':'100'" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" :width="webType&&!isChoose?'360':'100'"
+                       class-name="small-padding fixed-width">
         <template slot-scope="{row}">
           <template v-if="webType">
             <template v-if="!isChoose">
@@ -45,8 +49,8 @@
               <el-button @click="editStatus(row.id,'1')" v-else-if="row.enable==0" size="mini">
                 启用
               </el-button>
-              <el-button size="mini" @click="carEditOrderAddr(row.id,row.clientName)" type="primary">配置收货地址</el-button>
-              <el-button size="mini" @click="billBtn(row)" type="primary">开票抬头</el-button>
+              <el-button size="mini" @click="carEditOrderAddr(row.id,row.clientName)" type="primary">配置收货地址
+              </el-button>
             </template>
             <template v-else>
               <el-button @click="sourceType == 1? chooseThisTo(row):chooseThis(row)" type="primary" size="mini">
@@ -62,23 +66,18 @@
         </template>
       </el-table-column>
       <template v-if="!isChoose || !webType">
-      <el-table-column align="center" label="状态" class-name="status-col" width="100">
-        <template slot-scope="{row}">
-          <el-tag v-if="row.enable==1" type="success">
-            启用
-          </el-tag>
-          <el-tag v-else-if="row.enable==0" type="danger">
-            禁用
-          </el-tag>
-        </template>
-      </el-table-column>
+        <el-table-column align="center" label="状态" class-name="status-col" width="100">
+          <template slot-scope="{row}">
+            <el-tag v-if="row.enable==1" type="success">
+              启用
+            </el-tag>
+            <el-tag v-else-if="row.enable==0" type="danger">
+              禁用
+            </el-tag>
+          </template>
+        </el-table-column>
       </template>
       <el-table-column
-        width="100px"
-        prop="clientCode"
-        label="客户编号">
-      </el-table-column>
-      <el-table-column
         width="150px"
         prop="clientName"
         show-overflow-tooltip
@@ -87,70 +86,32 @@
           <span class="ellipsis"> {{ row.clientName }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        width="100px"
-        prop="balanceMoney"
-        label="客户余额">
-      </el-table-column>
       <template v-if="!isChoose|| !webType">
-      <el-table-column
-        width="120px"
-        prop="industryName"
-        label="所属行业">
-        <template slot-scope="{row}">
-          <el-tooltip :content="row.industryName" placement="top-start" effect="light">
-            <span class="ellipsis"> {{ row.industryName }}</span>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="80px"
-        prop="levelName"
-        label="客户级别">
-      </el-table-column>
-      <el-table-column
-        width="120px"
-        prop="payMode"
-        label="付款方式">
-        <template slot-scope="{row}">
-          <el-tooltip :content="row.payMode" placement="top-start" effect="light">
-            <span class="ellipsis"> {{ row.payMode }}</span>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="90px"
-        prop="contactMan"
-        show-overflow-tooltip
-        label="联系人">
-        <template slot-scope="{row}">
-          <span class="ellipsis"> {{ row.contactMan }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="150"
-        prop="contactPhone"
-        label="联系电话">
-      </el-table-column>
-      <el-table-column
-        align="left"
-        class-name="status-col"
-        width="280"
-        show-overflow-tooltip
-        label="联系地址">
-        <template slot-scope="{row}">
-          <span class="ellipsis"><span v-if="row.province">{{row.province}}</span><span v-if="row.city">{{row.city}}</span><span v-if="row.area">{{row.area}}</span><span v-if="row.address">{{row.address}}</span></span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        align="left"
-        class-name="status-col"
-        width="150"
-        label="欠款额度(元)">
-        <template slot-scope="{row}">
-          <span>{{ row.overdraftQuota * 0.01 }}</span>
-        </template>
-      </el-table-column>
+        <el-table-column
+          width="90px"
+          prop="contactMan"
+          show-overflow-tooltip
+          label="联系人">
+          <template slot-scope="{row}">
+            <span class="ellipsis"> {{ row.contactMan }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          width="150"
+          prop="contactPhone"
+          label="联系电话">
+        </el-table-column>
+        <el-table-column
+          align="left"
+          class-name="status-col"
+          width="280"
+          show-overflow-tooltip
+          label="联系地址">
+          <template slot-scope="{row}">
+            <span class="ellipsis"><span v-if="row.province">{{ row.province }}</span><span
+              v-if="row.city">{{ row.city }}</span><span v-if="row.area">{{ row.area }}</span><span v-if="row.address">{{ row.address }}</span></span>
+          </template>
+        </el-table-column>
       </template>
     </el-table>
     <pagination
@@ -160,111 +121,18 @@
       :limit.sync="listData.pageSize"
       @pagination="getTableInfo"/>
     <cancledialog @tableRefresh="tableRefresh" ref="confirmDialog"></cancledialog>
-    <el-dialog size="mini" title="发票抬头列表" :visible.sync="billDialog" width="1100px">
-      <el-button style="margin-top: -20px;margin-bottom: 10px" size="mini" type="primary" @click="addBill">新增发票抬头</el-button>
-      <el-table size="mini" border :data="gridData">
-        <el-table-column
-          label="#"
-          width="50px"
-          align="center"
-          type="index"
-          :index="indexMethod">
-        </el-table-column>
-        <el-table-column label="操作" width="140px" class-name="small-padding fixed-width">
-          <template slot-scope="scope">
-            <el-button @click="handBillUpdate(scope.row)" type="primary" size="mini">
-              修改
-            </el-button>
-            <el-button @click="editStatusBill(scope.row.id,'1')" type="danger" v-if="scope.row.voidFlag==0" size="mini">
-              禁用
-            </el-button>
-            <el-button @click="editStatusBill(scope.row.id,'0')" v-else-if="scope.row.voidFlag==1" size="mini">
-              启用
-            </el-button>
-          </template>
-        </el-table-column>
-        <el-table-column property="invoiceTitle" show-overflow-tooltip label="发票抬头" width="120"></el-table-column>
-        <el-table-column property="taxNum" show-overflow-tooltip label="税号" width="120"></el-table-column>
-        <el-table-column property="bankName" show-overflow-tooltip label="开户行" width="120"></el-table-column>
-        <el-table-column property="invoiceAddress" show-overflow-tooltip label="注册地址" width="120"></el-table-column>
-        <el-table-column property="invoicePhone" show-overflow-tooltip label="注册电话" width="120"></el-table-column>
-        <el-table-column align="center" label="状态" class-name="status-col" width="100">
-          <template slot-scope="{row}">
-            <el-tag v-if="row.voidFlag==1" type="danger">
-              禁用中
-            </el-tag>
-            <el-tag v-else-if="row.voidFlag==0" type="success">
-              启用中
-            </el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column property="createTime" label="创建时间" width="120">
-                  <template slot-scope="scope">
-                    <span v-if="scope.row.createTime">{{scope.row.createTime | getTime}}</span>
-                  </template>
-        </el-table-column>
-      </el-table>
-      <pagination
-        style="margin-top: 8px"
-        v-show="listData1.total>0"
-        :total="listData1.total"
-        :page.sync="listData1.page"
-        :limit.sync="listData1.pageSize"
-        @pagination="getClientInvoiceDatd"/>
-      <el-dialog
-        :close-on-click-modal="false"
-        width="480px"
-        size="mini"
-        :title="billTitle"
-        :visible.sync="innerVisible"
-        append-to-body>
-        <el-form  :inline="true" size="mini" label-width="100px">
-          <el-form-item label="发票抬头">
-            <el-input style="width: 300px" v-model="invoiceTitle" autocomplete="off"></el-input>
-          </el-form-item>
-          <el-form-item label="税号">
-            <el-input style="width: 300px" v-model="taxNum" autocomplete="off"></el-input>
-          </el-form-item>
-          <el-form-item label="开户行">
-            <el-input style="width: 300px" v-model="bankName" autocomplete="off"></el-input>
-          </el-form-item>
-          <el-form-item label="注册地址">
-            <el-input style="width: 300px" v-model="invoiceAddress" autocomplete="off"></el-input>
-          </el-form-item>
-          <el-form-item label="注册电话">
-            <el-input style="width: 300px" v-model="invoicePhone" autocomplete="off"></el-input>
-          </el-form-item>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button size="mini" @click="innerVisible = false">取 消</el-button>
-          <el-button size="mini"  type="primary" @click="dialogStatusBill=='1'?addInvoiceTitle():editBillBtn()">确 定</el-button>
-        </div>
-      </el-dialog>
-    </el-dialog>
 
   </div>
 </template>
 
 <script>
-import {
-  addInfo,
-  getIndustryInfo,
-  getInfo,
-  getInfoById,
-  getLevelInfo,
-  getPaytypeInfo,
-  updateInfo,
-  getClientInvoiceTitle,
-  addClientInvoiceTitle,
-  updateClientInvoiceTitle,
-  voidClientInvoiceTitle
-} from '@/api/doc/client/client.js'
+import { getInfo } from '@/api/doc/client/client.js'
 import Cancledialog from '@/components/Dialog/Cancledialog.vue'
 import Pagination from '@/components/Pagination'
 import Addressdny from '@/components/Dialog/Addressdny.vue'
 import 'vue-area-linkage/dist/index.css'
-import {pca, pcaa} from 'area-data'
-import { provinceAndCityData, regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import { pca, pcaa } from 'area-data'
+import { CodeToText, regionData } from 'element-china-area-data'
 
 export default {
   name: 'ClientList',
@@ -288,18 +156,18 @@ export default {
   },
   data() {
     return {
-      invoicePhone:"",
-      invoiceAddress:"",
-      bankName:"",
-      taxNum:"",
-      billId:"",
-      billTitle:"新增发票抬头",
+      invoicePhone: '',
+      invoiceAddress: '',
+      bankName: '',
+      taxNum: '',
+      billId: '',
+      billTitle: '新增发票抬头',
       dialogStatusBill: 1,//1增加,2修改
-      invoiceTitle:"",
-      innerVisible:false,
-      idClientRow:"",
-      gridData:[],//发票抬头列表
-      billDialog:false,
+      invoiceTitle: '',
+      innerVisible: false,
+      idClientRow: '',
+      gridData: [],//发票抬头列表
+      billDialog: false,
       selectedOptions: [],
       options: regionData, // 地址地区信息
       webType: true,
@@ -311,6 +179,7 @@ export default {
       dialogStatus: 1, // 1增加,2修改
       dialogTitle: '',
       dialogVisible: false,
+      disableLock: false,
       search: {
         keyWord: ''
       },
@@ -320,25 +189,25 @@ export default {
       levelList: [],
       rules: {
         industryName: [
-          {required: true, message: '请选择行业信息', trigger: 'change'}
+          { required: true, message: '请选择行业信息', trigger: 'change' }
         ],
         levelName: [
-          {required: true, message: '请选择客户等级', trigger: 'change'}
+          { required: true, message: '请选择客户等级', trigger: 'change' }
         ],
         payMode: [
-          {required: true, message: '请选择付款方式', trigger: 'change'}
+          { required: true, message: '请选择付款方式', trigger: 'change' }
         ],
         clientName: [
-          {required: true, message: '请填写客户名称', trigger: 'blur'}
+          { required: true, message: '请填写客户名称', trigger: 'blur' }
         ],
         contactMan: [
-          {required: true, message: '请填写联系人', trigger: 'blur'}
+          { required: true, message: '请填写联系人', trigger: 'blur' }
         ],
         contactPhone: [
-          {required: true, message: '请填写联系电话', trigger: 'blur'}
+          { required: true, message: '请填写联系电话', trigger: 'blur' }
         ],
         address: [
-          {required: true, message: '请填写详细地址', trigger: 'blur'}
+          { required: true, message: '请填写详细地址', trigger: 'blur' }
         ]
       },
       listData: {
@@ -366,145 +235,7 @@ export default {
     }
   },
   methods: {
-    editBillBtn(){
-      const _that = this;
-      if(!_that.invoiceTitle){
-        _that.$message("发票抬头不能为空");
-        return
-      }
-      if(!_that.invoiceTitle){
-        _that.$message("发票抬头不能为空");
-        return
-      }
-      if(!_that.taxNum){
-        _that.$message("税号不能为空");
-        return
-      }
-      if(!_that.bankName){
-        _that.$message("开户行不能为空");
-        return
-      }
-      if(!_that.invoiceAddress){
-        _that.$message("注册地址不能为空");
-        return
-      }
-      if(!_that.invoicePhone){
-        _that.$message("注册电话不能为空");
-        return
-      }
-      var invoiceTitle = {
-        'id':_that.billId,
-        'invoiceTitle': _that.invoiceTitle,
-        'taxNum': _that.taxNum,
-        'bankName': _that.bankName,
-        'invoiceAddress': _that.invoiceAddress,
-        'invoicePhone': _that.invoicePhone
-      }
-      var data = {
-        "invoiceTitle": JSON.stringify(invoiceTitle),
-      }
-
-      updateClientInvoiceTitle(data).then(response => {
-        console.log("tableData",response);
-        _that.$message("修改成功");
-        _that.innerVisible = false;
-        _that.getClientInvoiceDatd();
-      }).catch(err => {
-        _that.listLoading = false
-      })
-    },
-    handBillUpdate(row){
-      const _that = this;
-      _that.dialogStatusBill = 2;
-      _that.billTitle = "修改发票抬头";
-      _that.innerVisible = true;
-      _that.billId= row.id;
-      _that.invoiceTitle = row.invoiceTitle;
-      _that.taxNum = row.taxNum;
-      _that.bankName = row.bankName;
-      _that.invoiceAddress = row.invoiceAddress;
-      _that.invoicePhone = row.invoicePhone;
-    },
-    addInvoiceTitle(){
-      const _that = this;
-      if(!_that.invoiceTitle){
-        _that.$message("发票抬头不能为空");
-        return
-      }
-      if(!_that.taxNum){
-        _that.$message("税号不能为空");
-        return
-      }
-      if(!_that.bankName){
-        _that.$message("开户行不能为空");
-        return
-      }
-      if(!_that.invoiceAddress){
-        _that.$message("注册地址不能为空");
-        return
-      }
-      if(!_that.invoicePhone){
-        _that.$message("注册电话不能为空");
-        return
-      }
-      var invoiceTitle = {
-        'idClient':_that.idClientRow,
-        'invoiceTitle': _that.invoiceTitle,
-        'taxNum': _that.taxNum,
-        'bankName': _that.bankName,
-        'invoiceAddress': _that.invoiceAddress,
-        'invoicePhone': _that.invoicePhone
-      }
-      var data = {
-        "invoiceTitle": JSON.stringify(invoiceTitle)
-      }
-      addClientInvoiceTitle(data).then(response => {
-        // console.log("tableData",response);
-        _that.$message("增加成功");
-        _that.innerVisible = false;
-        _that.getClientInvoiceDatd();
-      }).catch(err => {
-        _that.listLoading = false
-      })
-    },
-    addBill(){
-      const _that = this;
-      _that.innerVisible = true;
-      _that.dialogStatusBill = 1;
-      _that.billTitle = "新增发票抬头";
-      _that.invoiceTitle = "";
-      _that.taxNum = "";
-      _that.bankName = "";
-      _that.invoiceAddress = "";
-      _that.invoicePhone = "";
-    },
-    billBtn(row){
-      const _that = this;
-      _that.billDialog = true;
-      _that.idClientRow = row.id;
-      _that.getClientInvoiceDatd();
 
-    },
-    getClientInvoiceDatd(){
-      const _that = this;
-      _that.listLoading = true;
-      var page = {
-        pageIndex: _that.listData1.page,
-        pageSize: _that.listData1.pageSize
-      }
-      var data = {
-        'idClient':_that.idClientRow,
-        'page': JSON.stringify(page)
-      }
-      getClientInvoiceTitle(data).then(response => {
-        // console.log("tableData",response);
-        _that.gridData = response.data;
-        _that.listData1.total = response.total
-        _that.listLoading = false
-      }).catch(err => {
-        _that.listLoading = false
-      })
-    },
     handleChange(value) {
       this.adrValue = CodeToText[value[0]] + '/' + CodeToText[value[1]] + '/' + CodeToText[value[2]]
       // console.log('adrValue', this.adrValue)
@@ -516,30 +247,34 @@ export default {
         this.cityshow = true
       }, 0)
     },
+    checkDisable(val) {
+      // console.log(val);
+      this.listData.page = 1;
+      this.getTableInfo()
+    },
+
     // 获取列表
     getTableInfo() {
       const _that = this
       _that.listLoading = true
+
+      if (_that.disableLock) {
+        _that.search.enable = 0;
+      } else {
+        _that.search.enable = 1;
+      }
+
       var params = _that.search
       var page = {
         pageIndex: _that.listData.page,
         pageSize: _that.listData.pageSize
       }
-      if (_that.search.keyWord) {
-        var data = {
-          'params': JSON.stringify(params),
-          'page': JSON.stringify(page)
-        }
-      } else {
-        var data = {
-          'params': {},
-          'page': JSON.stringify(page)
-        }
+      var data = {
+        'params': JSON.stringify(params),
+        'page': JSON.stringify(page)
       }
 
-      // console.log(data);
       getInfo(data).then(response => {
-        // console.log("tableData",response)
         const data = response.data
         // //  组合表单数据
         _that.tableData = data
@@ -549,216 +284,6 @@ export default {
       }).catch(err => {
         _that.listLoading = false
       })
-      if (_that.industryList.length <= 0) {
-        getIndustryInfo(data).then(response => {
-          // console.log("industryList", response.data)
-          const data = response.data
-          // //  组合表单数据
-          _that.industryList = response.data
-          // console.log(_that.shipAreaList);
-        }).catch(err => {
-          console.log(err)
-        })
-      }
-      if (_that.levelList.length <= 0) {
-        getLevelInfo(data).then(response => {
-          // console.log("levelList", response.data)
-          const data = response.data
-          // //  组合表单数据
-          _that.levelList = response.data
-        }).catch(err => {
-          console.log(err)
-        })
-      }
-      // 付款方式
-      if (_that.paytypeList.length <= 0) {
-        getPaytypeInfo().then(response => {
-          // console.log("Paytype", response.data)
-          const data = response.data
-          // //  组合表单数据
-          _that.paytypeList = response.data
-        }).catch(err => {
-          console.log(err)
-        })
-      }
-    },
-    // 增加客户信息
-    handleCreateAdd() {
-      const _that = this
-      _that.ruleForm = {}
-      _that.dialogTitle = '增加客户'
-      _that.dialogStatus = '1'
-      _that.dialogVisible = true
-      _that.iscityShow()
-    },
-    // 增加
-    addBtn(formName) {
-      const _that = this;
-      // console.log('_that.ruleForm', _that.ruleForm)
-      if (_that.selected.length < 1) {
-        _that.$message.error('请选择省市区')
-      }
-      _that.$refs[formName].validate((valid) => {
-        // console.log(valid);
-        if (valid) {
-          // console.log("ruleForm",_that.ruleForm);
-
-          var dataForm = {
-            idIndustry: _that.ruleForm.industryName.split(',')[1],
-            industryName: _that.ruleForm.industryName.split(',')[0],
-            clientName: _that.ruleForm.clientName,
-            contactMan: _that.ruleForm.contactMan,
-            contactPhone: _that.ruleForm.contactPhone,
-            province: _that.selected[0],
-            city: _that.selected[1],
-            area: _that.selected[2],
-            address: _that.ruleForm.address,
-            overdraftQuota: _that.ruleForm.overdraftQuota * 100,
-            idLevel: _that.ruleForm.levelName.split(',')[1],
-            levelName: _that.ruleForm.levelName.split(',')[0],
-            idPayMode: _that.ruleForm.payMode.split(',')[1],
-            payMode: _that.ruleForm.payMode.split(',')[0]
-          }
-          // console.log("dataForm", dataForm);
-          var info = JSON.stringify(dataForm)
-          // console.log(info);
-          var data = {
-            'clientInfo': info
-          }
-
-          // console.log("clientLevel",data);
-          addInfo(data).then(res => {
-            // console.log(res);
-            if (res.httpCode == 200) {
-              _that.dialogVisible = false
-              _that.$message({
-                message: '增加成功',
-                type: 'success'
-              })
-              _that.tableRefresh()
-            } else {
-              _that.$message.error(res.msg)
-            }
-          }).catch(err => {
-            _that.$message.error(err)
-            _that.dialogVisible = false
-          })
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    },
-
-    // 唤起修改
-    handleUpdate(id) {
-      const _that = this
-      _that.dialogTitle = '修改客户信息'
-      _that.dialogVisible = true
-      _that.dialogStatus = '2'
-      _that.byId = id
-      _that.iscityShow()
-      var data = {
-        idClient: id
-      }
-
-      getInfoById(data).then(res => {
-        // console.log(res);
-        var datas = res.data
-        // console.log("getInfoById",datas);
-        var addArray = []
-        addArray.push(datas.province)
-        addArray.push(datas.city)
-        addArray.push(datas.area)
-        _that.selected = addArray
-
-        _that.ruleForm = {
-          id: id,
-          idIndustry: datas.idIndustry,
-          industryName: datas.industryName,
-          clientName: datas.clientName,
-          contactMan: datas.contactMan,
-          contactPhone: datas.contactPhone,
-          province: datas.province,
-          city: datas.city,
-          area: datas.area,
-          address: datas.address,
-          overdraftQuota: datas.overdraftQuota,
-          idLevel: datas.idLevel,
-          levelName: datas.levelName,
-          idPayMode: datas.idPayMode,
-          payMode: datas.payMode
-        }
-      }).catch(err => {
-        _that.$message.error(err)
-      })
-    },
-    // 修改档案
-    editBtn(formName) {
-      const _that = this
-      _that.$refs[formName].validate((valid) => {
-        if (_that.ruleForm.industryName.split(',').length > 1) {
-          var industryName = _that.ruleForm.industryName.split(',')[0]
-          var idIndustry = _that.ruleForm.industryName.split(',')[1]
-        } else {
-          var industryName = _that.ruleForm.industryName
-          var idIndustry = _that.ruleForm.idIndustry
-        }
-        if (_that.ruleForm.levelName.split(',').length > 1) {
-          var levelName = _that.ruleForm.levelName.split(',')[0]
-          var idLevel = _that.ruleForm.levelName.split(',')[1]
-        } else {
-          var levelName = _that.ruleForm.levelName
-          var idLevel = _that.ruleForm.idLevel
-        }
-        if (_that.ruleForm.payMode.split(',').length > 1) {
-          var payMode = _that.ruleForm.payMode.split(',')[0]
-          var idPayMode = _that.ruleForm.payMode.split(',')[1]
-        } else {
-          var payMode = _that.ruleForm.payMode
-          var idPayMode = _that.ruleForm.idPayMode
-        }
-        var dataForm = {
-          id: _that.byId,
-          idIndustry: idIndustry,
-          industryName: industryName,
-          clientName: _that.ruleForm.clientName,
-          contactMan: _that.ruleForm.contactMan,
-          contactPhone: _that.ruleForm.contactPhone,
-          province: _that.ruleForm.province,
-          city: _that.ruleForm.city,
-          area: _that.ruleForm.area,
-          address: _that.ruleForm.address,
-          overdraftQuota: _that.ruleForm.overdraftQuota,
-          idLevel: idLevel,
-          levelName: levelName,
-          idPayMode: idPayMode,
-          payMode: payMode
-        }
-        // console.log("dataFormred",dataForm);
-        var info = JSON.stringify(dataForm)
-        var data = {
-          'clientInfo': info
-        }
-        // console.log(data);
-
-        updateInfo(data).then(res => {
-          // console.log(res);
-          if (res.httpCode == 200) {
-            _that.dialogVisible = false
-            _that.$message({
-              message: '修改成功',
-              type: 'success'
-            })
-            _that.tableRefresh()
-          } else {
-            _that.$message.error(res.msg)
-          }
-        }).catch(err => {
-          _that.$message.error(err)
-          _that.dialogVisible = true
-        })
-      })
     },
 
     // 启用禁用
@@ -775,39 +300,6 @@ export default {
       var url = '/doc/enableClientInfo'
       _that.$refs.confirmDialog.updataClick(params, url)
     },
-    // 启用禁用
-    editStatusBill(id, status) {
-      var _that = this;
-      this.$confirm('是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        var invoiceTitle = {
-          id: id,
-          voidFlag: status
-        }
-        var data = {
-          "invoiceTitle": JSON.stringify(invoiceTitle),
-        }
-
-        voidClientInvoiceTitle(data).then(response => {
-          console.log("tableData",response);
-          _that.$message("成功");
-          _that.getClientInvoiceDatd();
-        }).catch(err => {
-          _that.listLoading = false
-        })
-      }).catch(() => {
-
-      });
-      var params = {
-        'clientInfo': JSON.stringify(data)
-      }
-
-      var url = '/doc/enableClientInfo'
-      _that.$refs.confirmDialog.updataClick(params, url)
-    },
     // 刷新表格
     tableRefresh() {
       // 刷新变革
@@ -847,8 +339,6 @@ export default {
         id: row.id,
         name: row.clientName
       }
-
-
       this.$emit('chooseRow', data)
     },
     ERPChoose(row) {

+ 43 - 695
src/views/doc/client/components/customerDetail.vue

@@ -13,61 +13,18 @@
         {{ title }}
         <el-button  size="mini" style="margin-left: 7px;display: inline-block" type="primary" @click="isEdit?editBtn('ruleForm'):addBtn('ruleForm')">保存
         </el-button>
-        <el-button type="primary" style="display: inline-block" size="mini" icon="el-icon-refresh" @click="isEdit?editRefreshBtn():addRefreshBtn()">刷新</el-button>
       </div>
 
     </div>
 
     <el-form :model="ruleForm" label-width="130px" :rules="rules" ref="ruleForm" label-position="right">
-      <el-row :gutter="20">
-        <el-col v-if="!isEdit" :span="24">
-          <el-form-item label="智能识别">
-            <el-input type="textarea" size="mini" :rows="4" style="width: 600px" placeholder="粘贴客户信息" v-model="parseCustomer" clearable></el-input>
-            <el-button size="mini" type="green" @click="parseCustomerBtn()">识别</el-button>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="industryName" label="行业信息">
-            <el-select v-model="ruleForm.industryName" placeholder="请选择">
-              <el-option
-                v-for="item in industryList"
-                :key="item.id"
-                :label="item.industryName"
-                :value="item.industryName+','+item.id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="levelName" label="客户等级">
-            <el-select v-model="ruleForm.levelName" placeholder="请选择">
-              <el-option
-                v-for="item in levelList"
-                :key="item.id"
-                :label="item.levelName"
-                :value="item.levelName+','+item.id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="payMode" label="付款方式">
-            <el-select v-model="ruleForm.payMode" placeholder="请选择">
-              <el-option
-                v-for="item in paytypeList"
-                :key="item.id"
-                :label="item.payMode"
-                :value="item.payMode+','+item.id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
+      <el-row :gutter="10">
+        <el-col :span="10">
           <el-form-item prop="clientName" label="客户名称">
             <el-input v-model.trim="ruleForm.clientName"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-form-item prop="contactMan" label="联系人">
             <el-input v-model.trim="ruleForm.contactMan"></el-input>
           </el-form-item>
@@ -77,204 +34,25 @@
             <el-input v-model.trim="ruleForm.contactPhone"></el-input>
           </el-form-item>
         </el-col>
-<!--        <el-col :span="8">-->
-<!--          <el-form-item label="省/市/区:" class="postInfo-container-item">-->
-<!--            <el-cascader-->
-<!--              style="width: 100%"-->
-<!--              :options="options"-->
-<!--              v-model="selectedOptions1"-->
-<!--              @change="handleChange1">-->
-<!--            </el-cascader>-->
-<!--          </el-form-item>-->
-<!--        </el-col>-->
-<!--        <el-col :span="8">-->
-<!--          <el-form-item prop="address" label="详细地址">-->
-<!--            <el-input v-model="ruleForm.address"></el-input>-->
-<!--          </el-form-item>-->
-<!--        </el-col>-->
-        <!--          <el-col :span="12">-->
-        <!--            <el-form-item label="客户来源">-->
-        <!--              <el-input v-model="ruleForm.clientFrom"></el-input>-->
-        <!--            </el-form-item>-->
-        <!--          </el-col>-->
-        <el-col :span="8">
-          <el-form-item
-            prop="overdraftQuota"
-            :rules="[
-                { type: 'number', message: '欠款额度必须为数字值'}
-              ]"
-            label="欠款额度(元)">
-            <el-input v-model.number="ruleForm.overdraftQuota" autocomplete="off"></el-input>
+      </el-row>
+      <el-row :gutter="10">
+        <el-col :span="10">
+          <el-form-item label="省/市/区:" class="postInfo-container-item">
+            <el-cascader
+              style="width: 100%"
+              :options="options"
+              v-model="selectedOptions"
+              @change="handleChange">
+            </el-cascader>
+          </el-form-item>
+        </el-col>
+        <el-col :span="14">
+          <el-form-item label="具体地址">
+            <el-input v-model="ruleForm.address"></el-input>
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
-    <el-tabs v-if="!isEdit" type="border-card">
-      <el-tab-pane label="收货地址">
-        <div class="filter-container">
-          <el-button
-            class="filter-item"
-            type="primary"
-            icon="el-icon-plus"
-            size="mini"
-            v-if="!addAddressFlag"
-            @click="addAddressBtn()">
-            增加
-          </el-button>
-        </div>
-        <div v-show="addAddressFlag">
-          <el-form
-            style="padding-bottom: 10px"
-            :label-position="labelPosition"
-            label-width="80px"
-            size="mini"
-            :model="formLabelAlign">
-            <el-row :gutter="2">
-              <el-col :span="22">
-                <el-form-item label="智能识别">
-                  <el-input type="textarea" size="mini" :rows="4" style="width: 500px" placeholder="粘贴地址" v-model="parseAddress" clearable></el-input>
-                  <el-button size="mini" type="green" @click="parseAddressBtn()">识别</el-button>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item prop="shipMode" label="发货方式">
-                  <el-select v-model="formLabelAlign.shipMode" filterable placeholder="请选择">
-<!--                    <el-option-->
-<!--                      v-for="item in shipModeList"-->
-<!--                      :key="item.id"-->
-<!--                      :label="item.modeName"-->
-<!--                      :value="item.modeName+','+item.id">-->
-<!--                    </el-option>-->
-                    <template  v-if="!sendType || sendType == undefined" >
-                      <el-option
-                        v-for="item in sendKinds"
-                        :key="item.id"
-                        :label="item.modeName"
-                        :value="item.id">
-                      </el-option></template>
-                    <template v-else>
-                      <el-option
-                        v-for="item in sendKinds"
-                        :key="item.id"
-                        :label="item.logisticName"
-                        :value="item.id">
-                      </el-option>
-                    </template>
-                  </el-select>
-                  <el-checkbox style="width: 60px;display: inline-block" v-model="sendType" @change="chooseLogistics(sendType)">物流</el-checkbox>
-                </el-form-item>
-              </el-col>
-<!--              <el-col :span="6">-->
-<!--                <el-form-item prop="shipArea" label="发货区域">-->
-<!--                  <el-select v-model="formLabelAlign.shipArea" placeholder="请选择">-->
-<!--                    <el-option-->
-<!--                      v-for="item in shipAreaList"-->
-<!--                      :key="item.id"-->
-<!--                      :label="item.areaName"-->
-<!--                      :value="item.areaName+','+item.id">-->
-<!--                    </el-option>-->
-<!--                  </el-select>-->
-<!--                </el-form-item>-->
-<!--              </el-col>-->
-              <el-col :span="5">
-                <el-form-item label="收货人">
-                  <el-input v-model="formLabelAlign.linkManName"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="联系电话">
-                  <el-input v-model="formLabelAlign.linkManPhone"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="省/市/区:" class="postInfo-container-item">
-                  <el-cascader
-                    style="width: 100%"
-                    :options="options"
-                    v-model="selectedOptions"
-                    @change="handleChange">
-                  </el-cascader>
-                </el-form-item>
-              </el-col>
-              <el-col :span="18">
-                <el-form-item label="具体地址">
-                  <el-input v-model="formLabelAlign.address"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24">
-                <el-form-item>
-                  <el-button type="primary" @click="onSubmit">添加</el-button>
-                  <el-button @click="addAddressFlag=false">取消</el-button>
-                </el-form-item>
-              </el-col>
-
-            </el-row>
-          </el-form>
-        </div>
-        <el-table border size="mini" :data="gridData">
-          <el-table-column width="200" v-if="this.isEdit" label="操作">
-            <template slot-scope="scope">
-              <!--            <el-button-->
-              <!--              size="mini"-->
-              <!--              @click="carAddressSelectClick(scope.$index, scope.row)">-->
-              <!--              选址此地址-->
-              <!--            </el-button>-->
-              <!--              <el-button-->
-              <!--                size="mini"-->
-              <!--                @click="carAddressEditClick(scope.$index, scope.row)">-->
-              <!--                修改-->
-              <!--              </el-button>-->
-              <!--              <br>-->
-              <el-button
-                style="margin-top: 10px"
-                v-if="scope.row.defaultFlag==1"
-                type="primary"
-                :disabled=true
-                size="mini">
-                已默认
-              </el-button>
-              <el-button
-                style="margin-top: 10px"
-                v-else
-                size="mini"
-                @click="defaultFlagClick(scope.$index, scope.row.id)"
-              >
-                设置默认
-              </el-button>
-              <el-button
-                style="margin-top: 10px"
-                size="mini"
-                type="danger"
-                @click="carAddressDeleteClick(scope.$index, scope.row.id)">删除
-              </el-button>
-            </template>
-          </el-table-column>
-          <el-table-column property="shipModeName" label="发货方式" width="150"></el-table-column>
-<!--          <el-table-column property="shipArea" label="发货区域" width="150"></el-table-column>-->
-          <el-table-column property="receiveMan" label="收货人" width="150"></el-table-column>
-          <el-table-column property="receivePhone" label="联系电话" width="200"></el-table-column>
-          <el-table-column show-overflow-tooltip property="address" label="地址">
-            <template slot-scope="scope">
-              <div>
-                {{ scope.row.province }}{{ scope.row.city }}{{ scope.row.area }}{{ scope.row.address }}
-              </div>
-            </template>
-          </el-table-column>
-        </el-table>
-        <div v-show="gridData.length>0" style="margin-top: 10px" class="page">
-          <el-pagination
-            background
-            layout="prev, pager, next"
-            :total="total"
-            @current-change="handleCurrentChange"
-          >
-          </el-pagination>
-        </div>
-
-      </el-tab-pane>
-    </el-tabs>
-
-    <!--    <servicedialog @tableRefresh="tableRefresh" ref="menuDialog" :dialogStatus="dialogStatus" :menuId="menuId" :titleDialog="titleDialog" :dialogVisible="dialogVisible"/>-->
     <cancledialog @tableRefresh="tableRefresh" ref="confirmDialog"></cancledialog>
   </div>
 </template>
@@ -282,20 +60,12 @@
 <script>
 import {
   addClientInfo,
-  getIndustryInfo,
-  getInfo,
   getInfoById,
-  getLevelInfo,
-  getPaytypeInfo,
-  getshipModeListInfo,
-  updateInfo,
-  defaultAddress, deleteAddress,
-  getshipAreaListInfo
+  updateInfo
 } from '@/api/doc/client/client.js'
 import Cancledialog from '@/components/Dialog/Cancledialog.vue'
 import Pagination from '@/components/Pagination'
-import {provinceAndCityData, regionData, CodeToText, TextToCode} from 'element-china-area-data'
-import {getLogisticsInfoList, parseAddress} from "@/api/order/orderDetail";
+import {provinceAndCityData, regionData, CodeToText, TextToCode} from 'element-china-area-data';
 
 export default {
   components: {
@@ -311,7 +81,6 @@ export default {
     return {
       parseCustomer:"",
       parseAddress: '',
-      sendKinds: [],
       sendType:false,
       shipAreaList: [],
       tempRoute: {},
@@ -320,19 +89,8 @@ export default {
       adrValue1: '',
       adrValue: '',
       options: regionData, // 地址地区信息
-      shipModeList: [],
-      total: 0,
-      gridData: [],
       addAddressFlag: false,
       labelPosition: 'right',
-      formLabelAlign: {
-        linkManName: '',
-        linkManPhone: '',
-        address: '',
-        idShipMode: '',
-        shipModeName: '',
-        shipMode: ''
-      },
       title: '',
       cityshow: false,
       selected1: [], // 省市区
@@ -345,19 +103,7 @@ export default {
         keyWord: ''
       },
       ruleForm: {},
-      paytypeList: [],
-      industryList: [],
-      levelList: [],
       rules: {
-        industryName: [
-          {required: true, message: '请选择行业信息', trigger: 'change'}
-        ],
-        levelName: [
-          {required: true, message: '请选择客户等级', trigger: 'change'}
-        ],
-        payMode: [
-          {required: true, message: '请选择付款方式', trigger: 'change'}
-        ],
         clientName: [
           {required: true, message: '请填写客户名称', trigger: 'blur'}
         ],
@@ -371,19 +117,12 @@ export default {
           {required: true, message: '请填写详细地址', trigger: 'blur'}
         ]
       },
-      listData: {
-        total: 0,
-        page: 1,
-        pageSize: 10
-      },
       confirmdialog: false,
       listLoading: false,
-      tableData: [],
       menuId: ''
     }
   },
   created() {
-    this.getInfoData()
     // console.log(this.isEdit);
     if (this.isEdit) {
       this.title = '编辑客户信息(' + this.$route.query.clientName + ')'
@@ -396,119 +135,10 @@ export default {
     }
     // alert("1")
     this.tempRoute = Object.assign({}, this.$route);
-    this.getSendKind();
 
     this.iscityShow()
   },
   methods: {
-    parseCustomerBtn() {
-      const _that = this
-      if (!_that.parseCustomer) {
-        _that.$message.warning('请粘贴客户信息')
-        return
-      }
-      var newStr = _that.parseCustomer.replace(/[\r\n]/g,"");
-      var customeyArray =  newStr.split("客户名称-");
-      if(customeyArray.length>0){
-        // console.log(customeyArray);
-        var str1 = customeyArray[1].split("姓名-");
-        // console.log(str1);
-        var str2 = str1[1].split("电话-");
-        // console.log(str2);
-        var str3 = str2[1].split("地址-");
-        // console.log(str3);
-
-        _that.$set(_that.ruleForm,'clientName',str1[0]);
-        _that.$set(_that.ruleForm,'contactMan',str2[0]);
-        _that.$set(_that.ruleForm,'contactPhone',str3[0]);
-      }
-
-    },
-    parseAddressBtn() {
-      const _that = this
-      if(!_that.parseAddress){
-        _that.$message.warning('请粘贴地址')
-        return
-      }
-      var data = {
-        'address': _that.parseAddress
-      }
-      parseAddress(data).then(response => {
-        var data = response.data[0];
-        _that.$set(_that.formLabelAlign,'linkManName',data.name);
-        if (data.mobile) {
-          _that.$set(_that.formLabelAlign,'linkManPhone',data.mobile);
-        }
-        if (data.phone) {
-          _that.$set(_that.formLabelAlign,'linkManPhone',data.phone);
-        }
-        _that.adrValue = data.province + "/" + data.city + "/" + data.county;
-        _that.$set(_that.formLabelAlign,'address',data.details);
-        // console.log(_that.sendAddressList);
-        // console.log(_that.addressOption);
-        var addressOption = []
-        if (data.province) {
-          addressOption.push(TextToCode[data.province].code)
-          if (data.city) {
-            addressOption.push(TextToCode[data.province][data.city].code)
-            if (data.county) {
-              addressOption.push(TextToCode[data.province][data.city][data.county].code)
-            }
-          }
-        }
-        // console.log(addressOption);
-        _that.selectedOptions = addressOption;
-      }).catch(err => {
-        _that.$message.error(err)
-      })
-
-    },
-    // 选择物流档案
-    chooseLogistics(sendType) {
-      // console.log(row);
-      const _that = this
-      if (sendType) {
-        _that.getLogisticsInfo()
-      } else {
-        _that.getSendKind()
-      }
-    },
-    // 获取发货方式
-    getSendKind() {
-      var _that = this
-      getshipModeListInfo().then(response => {
-        // console.log('getSendKind', response)
-        _that.sendKinds = response.data
-      }).catch(err => {
-        console.log(err)
-      })
-    },
-
-    // 获取物流档案
-    getLogisticsInfo() {
-      var _that = this
-      var data = {
-        params: {
-          enable: 1
-        }
-      }
-      getLogisticsInfoList(data).then(response => {
-        // console.log('getSendKind', response)
-        _that.sendKinds = response.data
-      }).catch(err => {
-        // console.log(err)
-      })
-    },
-    addRefreshBtn() {
-      const _that = this
-      _that.ruleForm = {}
-      _that.formLabelAlign = {}
-      _that.gridData = []
-    },
-    editRefreshBtn() {
-      this.getInfoData()
-      this.getClientData()
-    },
     setTagsViewTitle() {
       const title = '编辑客户'
 
@@ -523,128 +153,36 @@ export default {
     },
     getClientData() {
       const _that = this
-      // console.log(_that.$route.query.id);
-      // console.log(this.$route.query.clientName);
       var data = {
         idClient: _that.$route.query.id
       }
       getInfoById(data).then(res => {
         // console.log("getInfoById",res);
+
         var datas = res.data
         this.setTagsViewTitle()
-        // console.log("getInfoById",datas);
-        // var addArray = [];
-        // addArray.push(datas.province);
-        // addArray.push(datas.city)
-        // addArray.push(datas.area)
-        // _that.selectedOptions1 = addArray;
-
         var addressOption = [];
         if(datas.province){
           addressOption.push(TextToCode[datas.province].code)
           addressOption.push(TextToCode[datas.province][datas.city].code)
           addressOption.push(TextToCode[datas.province][datas.city][datas.area].code)
         }
-
-        // console.log(addressOption);
-        // _that.addressInfo.selectedOptions = addressOption;
-        _that.selectedOptions1 = addressOption
+        _that.selectedOptions = addressOption
 
         _that.ruleForm = {
           id: _that.$route.query.id,
-          idIndustry: datas.idIndustry,
-          industryName: datas.industryName,
           clientName: datas.clientName,
           contactMan: datas.contactMan,
           contactPhone: datas.contactPhone,
           province: datas.province,
           city: datas.city,
           area: datas.area,
-          address: datas.address,
-          overdraftQuota: datas.overdraftQuota,
-          idLevel: datas.idLevel,
-          levelName: datas.levelName,
-          idPayMode: datas.idPayMode,
-          payMode: datas.payMode
+          address: datas.address
         }
-        _that.gridData = datas.addressList
       }).catch(err => {
         _that.$message.error(err)
       })
     },
-    onSubmit() {
-      const _that = this
-      // 在列表中添加地址
-      if (!_that.formLabelAlign.shipMode) {
-        _that.$message({
-          message: '发货方式不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      // if (!_that.formLabelAlign.shipArea) {
-      //   _that.$message({
-      //     message: '发货方式区域为空',
-      //     type: 'warning'
-      //   })
-      //   return
-      // }
-      if (!_that.formLabelAlign.linkManName) {
-        _that.$message({
-          message: '收货人不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      if (!_that.formLabelAlign.linkManPhone) {
-        _that.$message({
-          message: '联系电话不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      if (_that.adrValue.length <= 0) {
-        _that.$message({
-          message: '省市区不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      if (!_that.formLabelAlign.address) {
-        _that.$message({
-          message: '具体地址不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      _that.parseAddress= "";
-      var shipModeName = "";
-      if(_that.sendType){
-        shipModeName =_that.sendKinds.find(x=> x.id === _that.formLabelAlign.shipMode).logisticName;
-        var shipOrLogistics = 1;
-      }else {
-        shipModeName =_that.sendKinds.find(x=> x.id === _that.formLabelAlign.shipMode).modeName;
-        var shipOrLogistics = 0;
-      }
-      const data = {
-        receiveMan: _that.formLabelAlign.linkManName,
-        receivePhone: _that.formLabelAlign.linkManPhone,
-        // idShipArea: _that.formLabelAlign.shipArea.split(',')[1],
-        // shipArea: _that.formLabelAlign.shipArea.split(',')[0],
-        idShipMode: _that.formLabelAlign.shipMode,
-        shipModeName: shipModeName,
-        province: _that.adrValue.split('/')[0],
-        city: _that.adrValue.split('/')[1],
-        area: _that.adrValue.split('/')[2],
-        address: _that.formLabelAlign.address,
-        shipOrLogistics: shipOrLogistics
-      }
-      // console.log('data', data)
-      _that.gridData.push(data);
-      _that.formLabelAlign = {};
-      _that.adrValue = '';
-      _that.selectedOptions = [];
-    },
     // 增加
     addBtn(formName) {
       const _that = this
@@ -659,21 +197,13 @@ export default {
           // console.log("ruleForm",_that.ruleForm);
 
           var dataForm = {
-            idIndustry: _that.ruleForm.industryName.split(',')[1],
-            industryName: _that.ruleForm.industryName.split(',')[0],
             clientName: _that.ruleForm.clientName,
             contactMan: _that.ruleForm.contactMan,
             contactPhone: _that.ruleForm.contactPhone,
-            province: "",
-            city: "",
-            area: "",
-            address: "",
-            overdraftQuota: _that.ruleForm.overdraftQuota * 100,
-            idLevel: _that.ruleForm.levelName.split(',')[1],
-            levelName: _that.ruleForm.levelName.split(',')[0],
-            idPayMode: _that.ruleForm.payMode.split(',')[1],
-            payMode: _that.ruleForm.payMode.split(',')[0],
-            addressList: _that.gridData
+            province: _that.ruleForm.province,
+            city: _that.ruleForm.city,
+            area: _that.ruleForm.area,
+            address: _that.ruleForm.contactPhone
           }
           // console.log('dataForm', dataForm)
           var info = JSON.stringify(dataForm)
@@ -681,11 +211,6 @@ export default {
           var data = {
             'clientInfo': info
           }
-
-          if (_that.gridData.length < 1) {
-            _that.$message.error('请添加收货地址')
-            return
-          }
           // console.log("clientLevel",data);
           addClientInfo(data).then(res => {
             // console.log('addClientInfo', res)
@@ -710,64 +235,12 @@ export default {
         }
       })
     },
-    getInfoData() {
-      const _that = this
-      if (_that.industryList.length <= 0) {
-        getIndustryInfo().then(response => {
-          // console.log("industryList", response.data)
-          const data = response.data
-          // //  组合表单数据
-          _that.industryList = response.data;
-          _that.$set(_that.ruleForm,'industryName',response.data[0].industryName);
-          // console.log(_that.shipAreaList);
-        }).catch(err => {
-          console.log(err)
-        })
-      }
-      if (_that.levelList.length <= 0) {
-        getLevelInfo().then(response => {
-          // console.log("levelList", response.data)
-          const data = response.data
-          // //  组合表单数据
-          _that.levelList = response.data
-          _that.$set(_that.ruleForm,'levelName',response.data[0].levelName);
-        }).catch(err => {
-          console.log(err)
-        })
-      }
-      // 付款方式
-      if (_that.paytypeList.length <= 0) {
-        getPaytypeInfo().then(response => {
-          // console.log("Paytype", response.data)
-          const data = response.data
-          // //  组合表单数据
-          _that.paytypeList = response.data
-          _that.$set(_that.ruleForm,'payMode',response.data[0].payMode);
-        }).catch(err => {
-          console.log(err)
-        })
-      }
-      // 发货方式
-      // // 发货区域
-      // if (_that.shipAreaList.length <= 0) {
-      //   getshipAreaListInfo().then(response => {
-      //     // console.log('shipArea', response)
-      //     const data = response.data
-      //     // //  组合表单数据
-      //     _that.shipAreaList = response.data
-      //     // console.log(_that.shipAreaList);
-      //   }).catch(err => {
-      //     console.log(err)
-      //   })
-      // }
-    },
-    // 选择地区以后触发
-    handleChange1(value) {
-      this.adrValue1 = CodeToText[value[0]] + '/' + CodeToText[value[1]] + '/' + CodeToText[value[2]]
-      // console.log('adrValue1', this.adrValue1)
-    },
     handleChange(value) {
-      this.adrValue = CodeToText[value[0]] + '/' + CodeToText[value[1]] + '/' + CodeToText[value[2]]
+      const _that = this
+      _that.adrValue = CodeToText[value[0]] + '/' + CodeToText[value[1]] + '/' + CodeToText[value[2]]
+      _that.ruleForm.province = CodeToText[value[0]]
+      _that.ruleForm.city = CodeToText[value[1]]
+      _that.ruleForm.area = CodeToText[value[2]]
       // console.log('adrValue', this.adrValue)
     },
     handleCurrentChange(val) {
@@ -785,58 +258,20 @@ export default {
         this.cityshow = true
       }, 0)
     },
-    // 增加客户信息
-    handleCreateAdd() {
-      const _that = this
-      _that.ruleForm = {}
-      _that.dialogTitle = '增加客户'
-      _that.dialogStatus = '1'
-      _that.dialogVisible = true
-      _that.iscityShow()
-    },
     // 修改档案
     editBtn(formName) {
       const _that = this
       // console.log("编辑");
       _that.$refs[formName].validate((valid) => {
-        if (_that.ruleForm.industryName.split(',').length > 1) {
-          var industryName = _that.ruleForm.industryName.split(',')[0]
-          var idIndustry = _that.ruleForm.industryName.split(',')[1]
-        } else {
-          var industryName = _that.ruleForm.industryName
-          var idIndustry = _that.ruleForm.idIndustry
-        }
-        if (_that.ruleForm.levelName.split(',').length > 1) {
-          var levelName = _that.ruleForm.levelName.split(',')[0]
-          var idLevel = _that.ruleForm.levelName.split(',')[1]
-        } else {
-          var levelName = _that.ruleForm.levelName
-          var idLevel = _that.ruleForm.idLevel
-        }
-        if (_that.ruleForm.payMode.split(',').length > 1) {
-          var payMode = _that.ruleForm.payMode.split(',')[0]
-          var idPayMode = _that.ruleForm.payMode.split(',')[1]
-        } else {
-          var payMode = _that.ruleForm.payMode
-          var idPayMode = _that.ruleForm.idPayMode
-        }
         var dataForm = {
           id: _that.$route.query.id,
-          idIndustry: idIndustry,
-          industryName: industryName,
           clientName: _that.ruleForm.clientName,
           contactMan: _that.ruleForm.contactMan,
           contactPhone: _that.ruleForm.contactPhone,
-          // province: _that.ruleForm.province,
-          // city: _that.ruleForm.city,
-          // area: _that.ruleForm.area,
-          // address: _that.ruleForm.address,
-          overdraftQuota: _that.ruleForm.overdraftQuota,
-          idLevel: idLevel,
-          levelName: levelName,
-          idPayMode: idPayMode,
-          payMode: payMode,
-          // addressList: _that.gridData
+          province: _that.ruleForm.province,
+          city: _that.ruleForm.city,
+          area: _that.ruleForm.area,
+          address: _that.ruleForm.address
         }
         // console.log("dataFormred",dataForm);
         var info = JSON.stringify(dataForm)
@@ -855,6 +290,7 @@ export default {
             })
             _that.$store.dispatch("tagsView/delView", _that.$route);
             _that.$router.push({path: '/doc/clientList'})
+
           } else {
             _that.$message.error(res.msg)
           }
@@ -864,32 +300,6 @@ export default {
         })
       })
     },
-
-    // 启用禁用
-    editStatus(id, status) {
-      var _that = this;
-      var data = {
-        id: id,
-        enable: status
-      }
-      var params = {
-        'clientInfo': JSON.stringify(data)
-      }
-
-      var url = '/doc/enableClientInfo'
-      _that.$refs.confirmDialog.updataClick(params, url)
-    },
-    // 刷新表格
-    tableRefresh() {
-      // 刷新变革
-      this.getTableInfo()
-    },
-
-    // 搜索
-    searchData() {
-      this.listData.page = 1
-      this.getTableInfo()
-    },
     carEditOrderAddr(id, name) {
       this.$refs.address.outerVisible = true
       this.$refs.address.idClient = id
@@ -897,80 +307,18 @@ export default {
       var pageNum = 1
       this.$refs.address.getInfo(pageNum, '')
       this.$refs.address.searchVal = ''
-    },
-    getAdress(adr) {
-      // console.log(adr);
-      // this.defaultAddress = adr;
-      // // console.log(this.defaultAddress);
-      // this.$forceUpdate();//重绘
-    },
-    defaultFlagClick(index, id) {
-      const _that = this
-      _that.$confirm('设置默认?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消'
-      }).then(() => {
-        var data = {
-          'idReceiveAddress': id
-        }
-
-        defaultAddress(data).then(res => {
-          // console.log(res);
-          if (res.httpCode == 200) {
-            _that.$message({
-              message: '设置成功',
-              type: 'success'
-            })
-            _that.getClientData()
-          } else {
-            _that.$message.error(res.msg)
-          }
-        }).catch(err => {
-          _that.$message.error(err)
-        })
-      }).catch(() => {
-
-      })
-    },
-    carAddressDeleteClick(index, id) {
-      const _that = this
-      _that.$confirm('确认删除?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消'
-      }).then(() => {
-        var data = {
-          'idReceiveAddress': id
-        }
-
-        deleteAddress(data).then(res => {
-          // console.log(res);
-          if (res.httpCode == 200) {
-            _that.$message({
-              message: '删除成功',
-              type: 'success'
-            })
-            _that.getClientData()
-          } else {
-            _that.$message.error(res.msg)
-          }
-        }).catch(err => {
-          _that.$message.error(err)
-        })
-      }).catch(() => {
-
-      })
     }
   }
 }
 </script>
 <style>
-.area-select .area-selected-trigger {
-  padding: 0px 20px 7px 12px !important;
-}
+/*.area-select .area-selected-trigger {*/
+/*  padding: 0px 20px 7px 12px !important;*/
+/*}*/
 
-.area-select {
-  height: 40px !important;
-}
+/*.area-select {*/
+/*  height: 40px !important;*/
+/*}*/
 </style>
 <style lang="scss" scoped>
 .el-page-header__content {

+ 1 - 14
src/views/order/orderList/orderList.vue

@@ -68,17 +68,6 @@
             创建订单
           </el-button>
         </el-form>
-      <!--      <el-select v-model="columnSelect" :size="sizeType" clearable placeholder="请选择视图" @change="selectedColumn">-->
-      <!--        <el-option-->
-      <!--          v-for="item in defaultColumnName"-->
-      <!--          :key="item.id"-->
-      <!--          :label="item.columnList.name"-->
-      <!--          :value="item.id">-->
-      <!--        </el-option>-->
-      <!--      </el-select>-->
-      <!--      <el-button class="filter-item" :size="sizeType" type="primary" icon="el-icon-document" @click="diyColumn">-->
-      <!--        自定义列-->
-      <!--      </el-button>-->
       <div class="top-right-btn">
         <el-tooltip class="item" effect="dark" content="刷新" placement="top">
           <el-button size="mini" circle icon="el-icon-refresh" @click="getList"/>
@@ -154,9 +143,7 @@
             fixed
             show-overflow-tooltip>
             <template slot-scope="{row}">
-              <a v-if="row.idProduct<0" href="javascript:;" style="color: #20a0ff"
-                 @click="openMaterialDetail(row)">{{ row[column.field] }}</a>
-              <a v-else href="javascript:;" style="color: #20a0ff" @click="openDetail(row)">{{ row[column.field] }}</a>
+              <a href="javascript:;" style="color: #20a0ff" @click="openDetail(row)">{{ row[column.field] }}</a>
             </template>
           </el-table-column>
           <el-table-column