|
@@ -115,6 +115,7 @@
|
|
|
<el-button type="text" size="small" @click="openShouldAmountDialog(row)">应收款</el-button>
|
|
|
<el-button type="text" size="small" @click="openFinanceInvoiceDialog(row.orderFundId,row.realAmount,row.clientName,row.clientSubName)">申请开票</el-button>
|
|
|
<el-button type="text" size="small" @click="productionList(row.id)">产品包</el-button>
|
|
|
+ <el-button type="text" size="mini" @click="openProductionReturnDialog(row)">申请产品退回</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</parentTable>
|
|
@@ -594,6 +595,61 @@
|
|
|
<el-button type="primary" @click="saveInvoice()">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :visible.sync="productionReturnDialog" width="55%" center @closed="resetProductionReturnForm()">
|
|
|
+ <el-form ref="productionReturnForm" :model="productionReturnForm" :rules="productionReturnFormRules">
|
|
|
+ <el-divider content-position="left">申请产品退回</el-divider>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="24" :lg="24" :span="6">
|
|
|
+ <el-form-item label="项目名称:" prop="name" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="productionReturnForm.name" class="filter-item" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="项目编号:" prop="orderId" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="productionReturnForm.orderId" class="filter-item" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="客户名称:" prop="clientName" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="productionReturnForm.clientName" class="filter-item" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="业务来源:" prop="clientSubName" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="productionReturnForm.clientSubName" class="filter-item" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="委托人:" prop="bailor" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="productionReturnForm.bailor" class="filter-item" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="退产品原因:" prop="returnReason" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="productionReturnForm.returnReason" class="filter-item" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="是否退发票:" prop="returnInvoice" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-select v-model="productionReturnForm.returnInvoice" style="width: 100%">
|
|
|
+ <el-option label="退发票" value="true"></el-option>
|
|
|
+ <el-option label="不退发票" value="false"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="productionReturnDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="saveProductionreturn()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -688,6 +744,12 @@ export default {
|
|
|
newInvoiceDialog:false,
|
|
|
invoiceData: [],
|
|
|
hiddenLabels: [],
|
|
|
+ productionReturnDialog: false,
|
|
|
+ productionReturnForm: {},
|
|
|
+ productionReturnFormRules: {
|
|
|
+ returnReason: [{ required: true, message: '退产品原因不能为空', trigger: 'blur' }],
|
|
|
+ returnInvoice: [{ required: true, message: '请选择是否退发票', trigger: 'change' }],
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -1117,6 +1179,54 @@ export default {
|
|
|
removeCookie("PersonalMineList-hiddenLabels");
|
|
|
location.reload();
|
|
|
},
|
|
|
+ openProductionReturnDialog(row) {
|
|
|
+ // 判断产品是否已经出库了
|
|
|
+ if (row.repertoryState) {
|
|
|
+ // 赋值基础信息
|
|
|
+ this.productionReturnForm.businessType = 'PERSONAL_BUSINESS';
|
|
|
+ this.productionReturnForm.businessId = row.id;
|
|
|
+ this.productionReturnForm.name = row.orderName;
|
|
|
+ this.productionReturnForm.orderId = row.orderId;
|
|
|
+ this.productionReturnForm.productionType = 'FINAL'
|
|
|
+ this.productionReturnForm.clientName = row.clientName;
|
|
|
+ this.productionReturnForm.clientSubName = row.clientSubName;
|
|
|
+ this.productionReturnForm.bailor = row.bailorA;
|
|
|
+ if (row.bailorB) {
|
|
|
+ this.productionReturnForm.bailor = row.bailorA + '、' + row.bailorB;
|
|
|
+ }
|
|
|
+ // 打开dialog
|
|
|
+ this.productionReturnDialog = true;
|
|
|
+ } else {
|
|
|
+ this.$notify({
|
|
|
+ title: '警告',
|
|
|
+ message: '产品未出库,无需发起产品退回流程!',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 发起产品退回流程
|
|
|
+ saveProductionreturn() {
|
|
|
+ this.$refs.productionReturnForm.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.$api.productionReturn.save(this.productionReturnForm).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '产品退回申请流程已发起!',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ this.productionReturnDialog = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 重置表单
|
|
|
+ resetProductionReturnForm() {
|
|
|
+ this.$refs.productionReturnForm.resetFields();
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
}
|