|  | @@ -50,6 +50,14 @@
 | 
	
		
			
				|  |  |            {{ scope.row.createFreight == 1? '是': '否' }}
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="menu">
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            type="text"
 | 
	
		
			
				|  |  | +            icon="el-icon-delete"
 | 
	
		
			
				|  |  | +            size="small"
 | 
	
		
			
				|  |  | +            @click.stop="createPlant(scope.row,scope.index)"
 | 
	
		
			
				|  |  | +            :disabled="scope.row.status > 0 || scope.row.createFreight == 1"
 | 
	
		
			
				|  |  | +          >生成工厂发货
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  |  <!--          <el-button-->
 | 
	
		
			
				|  |  |  <!--            type="text"-->
 | 
	
		
			
				|  |  |  <!--            icon="el-icon-edit"-->
 | 
	
	
		
			
				|  | @@ -62,7 +70,7 @@
 | 
	
		
			
				|  |  |              icon="el-icon-delete"
 | 
	
		
			
				|  |  |              size="small"
 | 
	
		
			
				|  |  |              @click.stop="rowDel(scope.row,scope.index)"
 | 
	
		
			
				|  |  | -            :disabled="scope.row.status > 0"
 | 
	
		
			
				|  |  | +            :disabled="scope.row.status > 0 || scope.row.createFreight == 1"
 | 
	
		
			
				|  |  |            >删除
 | 
	
		
			
				|  |  |            </el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
	
		
			
				|  | @@ -122,7 +130,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import option from "./configuration/mainList.json";
 | 
	
		
			
				|  |  | -import {customerList, deleteDetails} from "@/api/basicData/purchaseOrder"
 | 
	
		
			
				|  |  | +import {customerList, deleteDetails, generateShipment} from "@/api/basicData/purchaseOrder"
 | 
	
		
			
				|  |  |  import detailPage from "./detailsPageEdit";
 | 
	
		
			
				|  |  |  import { defaultDate } from "@/util/date";
 | 
	
		
			
				|  |  |  import ApplyPayment from "@/components/finance/applyPayment";
 | 
	
	
		
			
				|  | @@ -545,6 +553,24 @@ export default {
 | 
	
		
			
				|  |  |      choceFun(){
 | 
	
		
			
				|  |  |        this.financialAccountDialog  = false
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 生成工厂发货
 | 
	
		
			
				|  |  | +    createPlant(row, index) {
 | 
	
		
			
				|  |  | +      let ids = [];
 | 
	
		
			
				|  |  | +      row.itemsList.forEach(item => {
 | 
	
		
			
				|  |  | +        ids.push(item.id)
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      let data = {
 | 
	
		
			
				|  |  | +        id: row.id,
 | 
	
		
			
				|  |  | +        orderItemIds: ids
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      generateShipment(data).then(res => {
 | 
	
		
			
				|  |  | +        this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
 | 
	
		
			
				|  |  | +        this.$router.push({
 | 
	
		
			
				|  |  | +          path: "/businessManagement/receipt/index",
 | 
	
		
			
				|  |  | +          query: {form: JSON.stringify(res.data.data)},
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </script>
 |