| | |
| | | <span>状态:</span> |
| | | <el-select v-model="search.type" size="small" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="全部" :value="null"></el-option> |
| | | <el-option label="通过" :value="0"></el-option> |
| | | <el-option label="不通过" :value="1"></el-option> |
| | | <el-option label="未审核" :value="2"></el-option> |
| | | <el-option label="通过" :value="1"></el-option> |
| | | <el-option label="不通过" :value="0"></el-option> |
| | | </el-select> |
| | | <span>交货日期:</span> |
| | | <el-date-picker v-model="search.delTime" size="small" placeholder="请输入" style="width: 224px;margin-right: 30px;" |
| | |
| | | <span class="table_do" @click="changeShowDetail(scope.row)"> 查看详情 </span> |
| | | <span class="table_do" v-if="scope.row.type==null" @click="saleCheck(scope)"> 审核 </span> |
| | | <span class="table_do" v-else> </span> |
| | | <span class="table_do" @click="openUpDia(scope.row.id)"> 编辑 </span> |
| | | <span class="table_do" v-if="scope.row.type==null" @click="openUpDia(scope.row.id)"> 编辑 </span> |
| | | <span class="table_do" v-else> </span> |
| | | <span class="table_do" @click="delSale(scope.$index)"> 删除 </span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </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"> |
| | |
| | | <el-col :span="3" :offset="2">交货日期</el-col> |
| | | <el-col :span="8"> |
| | | <el-date-picker v-model="addData.delTime" size="small" placeholder="请输入交货日期" clearable |
| | | value-format="yyyy-MM-dd"></el-date-picker> |
| | | value-format="yyyy-MM-dd" style="width: 100%;"></el-date-picker> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | <el-table-column prop="number" label="数量"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model.number="scope.row.number" size="small" |
| | | @change="scope.row.number = isNaN(scope.row.number)?0:scope.row.number" clearable |
| | | @change="(val)=>scope.row.number = isNaN(val)?null:val" clearable |
| | | placeholder="请输入"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | delTime: null |
| | | }, |
| | | tableData: [], |
| | | selects: [], |
| | | selects: '', |
| | | currentPage: 1, |
| | | countSize: 0, |
| | | pageSize: 10, |
| | |
| | | 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.id; |
| | | this.selects = '' |
| | | val.forEach((a, ai)=>{ |
| | | this.selects += a.id |
| | | if(ai!=val.length-1){ |
| | | this.selects += ',' |
| | | } |
| | | }) |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.pageSize = val |
| | |
| | | }) |
| | | }, |
| | | clean() { |
| | | this.selects = [] |
| | | this.selects = '' |
| | | this.currentPage = 1 |
| | | this.countSize = 0 |
| | | this.pageSize = 10 |
| | |
| | | formTime: null, |
| | | createTime: null, |
| | | insState: 2, |
| | | judgeState: 2 |
| | | judgeState: 2, |
| | | type: null |
| | | } |
| | | this.selectRawInspectsList() |
| | | }, |
| | |
| | | type: 1 |
| | | }).then(res => { |
| | | this.selectRawInspectsList() |
| | | this.$parent.removeAllTab() |
| | | }) |
| | | }).catch(e => { |
| | | if (e == 'cancel') { |
| | |
| | | }) |
| | | }, |
| | | upSale() { |
| | | console.log(this.addData); |
| | | for (var b = 0; b < this.addData.saleMaterialList.length; b++) { |
| | | if (Object.keys(this.addData.saleMaterialList[b]).length == 0) { |
| | | this.addData.saleMaterialList.splice(b, 1) |
| | |
| | | } |
| | | } |
| | | for (var a in this.addData) { |
| | | if ((this.addData[a] == null || this.addData[a] == '') && a != 'type') { |
| | | console.log(a); |
| | | if ((this.addData[a] == null || this.addData[a] == '') && a!='checkname' && a!='checkTime' && a != 'type') { |
| | | if (a == 'saleMaterialList') { |
| | | this.$message.error('产品信息不能为空') |
| | | } else { |
| | |
| | | }) |
| | | }, |
| | | delSales(){ |
| | | console.log(this.selects); |
| | | 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() |