|  | @@ -11,8 +11,8 @@
 | 
	
		
			
				|  |  |            <!--<el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>-->
 | 
	
		
			
				|  |  |            <el-button type="text" size="small" :disabled="Number(row.sendTotalNum) == Number(row.goodsTotalNum)" @click="rowCell(row, index)">{{ row.$cellEdit ? '保存' : '修改' }}
 | 
	
		
			
				|  |  |            </el-button>
 | 
	
		
			
				|  |  | -            <el-button style="color: red" type="text" size="small" v-if="row.statusName == '已派工'" @click="shipRevokeWorkOrderfun(row, index)">撤销派工
 | 
	
		
			
				|  |  | -            </el-button>
 | 
	
		
			
				|  |  | +            <!--<el-button style="color: red" type="text" size="small" v-if="row.statusName == '已派工'" @click="shipRevokeWorkOrderfun(row, index)">撤销派工-->
 | 
	
		
			
				|  |  | +            <!--</el-button>-->
 | 
	
		
			
				|  |  |            <!-- <el-button :disabled="row.statusName === '已派工'" :size="size" :type="type"
 | 
	
		
			
				|  |  |              @click="$refs.crud.rowDel(row, index)">删除
 | 
	
		
			
				|  |  |            </el-button> -->
 | 
	
	
		
			
				|  | @@ -26,9 +26,9 @@
 | 
	
		
			
				|  |  |            <el-button type="success" icon="el-icon-finished" size="small" @click="dispatching"
 | 
	
		
			
				|  |  |              :disabled="selectionList.length <= 0">派工
 | 
	
		
			
				|  |  |            </el-button>
 | 
	
		
			
				|  |  | -            <!--<el-button type="success" icon="el-icon-finished" size="small" @click="shipRevokeWorkOrderfun"-->
 | 
	
		
			
				|  |  | -            <!--           :disabled="selectionList.length <= 0">撤销派工-->
 | 
	
		
			
				|  |  | -            <!--</el-button>-->
 | 
	
		
			
				|  |  | +            <el-button type="success" icon="el-icon-finished" size="small" @click="shipRevokeWorkOrderfun"
 | 
	
		
			
				|  |  | +                       :disabled="!chexiaofun()">撤销派工
 | 
	
		
			
				|  |  | +            </el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </avue-crud>
 | 
	
		
			
				|  |  |      </basic-container>
 | 
	
	
		
			
				|  | @@ -46,6 +46,7 @@ import {
 | 
	
		
			
				|  |  |      shipRevokeWorkOrder
 | 
	
		
			
				|  |  |  } from "@/api/tirePartsMall/salesManagement/outboundTask";
 | 
	
		
			
				|  |  |  import da from "element-ui/src/locale/lang/da";
 | 
	
		
			
				|  |  | +import fa from "element-ui/src/locale/lang/fa";
 | 
	
		
			
				|  |  |  // import detailsPage from "./detailsPage"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
	
		
			
				|  | @@ -128,6 +129,7 @@ export default {
 | 
	
		
			
				|  |  |                  label: '已完成',
 | 
	
		
			
				|  |  |                  value: '已完成'
 | 
	
		
			
				|  |  |              }],
 | 
	
		
			
				|  |  | +            value:'待处理'
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  |            label: '业务对象',
 | 
	
		
			
				|  |  |            prop: "customerName",
 | 
	
	
		
			
				|  | @@ -264,20 +266,36 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +      // 撤销派工的数据判断
 | 
	
		
			
				|  |  | +      chexiaofun(){
 | 
	
		
			
				|  |  | +          let typefalse = false
 | 
	
		
			
				|  |  | +          for(let item of this.selectionList) {
 | 
	
		
			
				|  |  | +              if (item.statusName == '已派工') {
 | 
	
		
			
				|  |  | +                  typefalse = true
 | 
	
		
			
				|  |  | +              }else {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                  typefalse = false
 | 
	
		
			
				|  |  | +                  break;
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          return typefalse
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |      selectionChange(list) {
 | 
	
		
			
				|  |  |        console.log(list);
 | 
	
		
			
				|  |  |        this.selectionList = list
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |        // 撤销派工
 | 
	
		
			
				|  |  | -      shipRevokeWorkOrderfun(row){
 | 
	
		
			
				|  |  | +      shipRevokeWorkOrderfun(){
 | 
	
		
			
				|  |  |            this.$confirm('是否要撤销派工?', '提示', {
 | 
	
		
			
				|  |  |                confirmButtonText: '确定',
 | 
	
		
			
				|  |  |                cancelButtonText: '取消',
 | 
	
		
			
				|  |  |                type: 'warning'
 | 
	
		
			
				|  |  |            }).then(()=>{
 | 
	
		
			
				|  |  | -              // this.loading = true; // Show the loading spinner
 | 
	
		
			
				|  |  | -              shipRevokeWorkOrder(row.id).then(res=>{
 | 
	
		
			
				|  |  | -                  console.log(res,273)
 | 
	
		
			
				|  |  | +              const data = []
 | 
	
		
			
				|  |  | +              for(let i in this.selectionList) {
 | 
	
		
			
				|  |  | +                  data.push(this.selectionList[i].id)
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +              shipRevokeWorkOrder(data.join(',')).then(res=>{
 | 
	
		
			
				|  |  |                    this.$message({
 | 
	
		
			
				|  |  |                        type: 'success',
 | 
	
		
			
				|  |  |                        message: '撤销派工成功!'
 |