王震
2023-09-15 5c76f242b20281b51d01ce2266e8beaafe8ae5a6
src/components/view/sale.vue
@@ -282,7 +282,8 @@
         </el-dialog>
      </div>
      <div class="select-model">
         <el-dialog :title="`销售${upDia==true?'修改':'新增'}`" :visible.sync="addDia" width="850px">
         <el-dialog :title="`销售${upDia==true?'修改':'新增'}`" :visible.sync="addDia" width="850px"
         @close="closeDialog">
            <div class="body">
               <div class="head">基本信息</div>
               <div class="content">
@@ -402,7 +403,7 @@
               delTime: null
            },
            tableData: [],
            selects: [],
            selects: '',
            currentPage: 1,
            countSize: 0,
            pageSize: 10,
@@ -429,10 +430,27 @@
         this.selectRawInspectsList()
      },
      methods: {
         closeDialog(){
            this.addData = {
               orderNumber: null,
               code: null,
               name: null,
               proname: null,
               adress: null,
               username: null,
               delTime: null,
               orderName: null,
               phone: null,
               saleMaterialList: []
            }
         },
         handleSelectionChange(val) {
            this.selects = []
            val.forEach(a=>{
               this.selects.push(a.id)
            this.selects = ''
            val.forEach((a, ai)=>{
               this.selects += a.id
               if(ai!=val.length-1){
                  this.selects += ','
               }
            })
         },
         handleSizeChange(val) {
@@ -459,7 +477,7 @@
            })
         },
         clean() {
            this.selects = []
            this.selects = ''
            this.currentPage = 1
            this.countSize = 0
            this.pageSize = 10
@@ -467,7 +485,8 @@
               formTime: null,
               createTime: null,
               insState: 2,
               judgeState: 2
               judgeState: 2,
               type: null
            }
            this.selectRawInspectsList()
         },
@@ -543,6 +562,7 @@
                  type: 1
               }).then(res => {
                  this.selectRawInspectsList()
                  this.$parent.removeAllTab()
               })
            }).catch(e => {
               if (e == 'cancel') {
@@ -615,17 +635,12 @@
            })
         },
         delSales(){
            console.log(this.selects);
            if(this.selects.length==0) {
            if(this.selects=='') {
               this.$message.warning('请选择一条数据删除')
               return
            }
            this.axios.post(this.$api.url.delAllSale,{
               ids: this.selects
            }, {
               headers: {
                  'Content-Type': 'application/json'
               }
            }).then(res=>{
               this.$message.success('删除成功')
               this.selectRawInspectsList()