|
|
|
@ -172,18 +172,69 @@
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-card class="el-card">
|
|
|
|
|
<el-row style="margin-bottom: 20px;">
|
|
|
|
|
<el-button type="primary" @click="batchSetParams(null,'salesListNo')">批量设置销售清单</el-button>
|
|
|
|
|
<el-button type="primary" @click="batchSetParams(null, 'firstSalesInvNo')">批量设置销售发票第一票</el-button>
|
|
|
|
|
<el-button type="primary" @click="batchSetParams(null, 'secSalesInvNo')">批量设置销售发票第二票</el-button>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="detailLoading"
|
|
|
|
|
:data="detailList"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
width="55">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column type="index" label="序号" width="50"></el-table-column>
|
|
|
|
|
<el-table-column label="产品通用名" prop="productName"></el-table-column>
|
|
|
|
|
<el-table-column label="包装规格" prop="spec"></el-table-column>
|
|
|
|
|
<el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
|
|
<el-table-column label="销售清单号(第二票)" prop="secSalesListNo">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input :disabled="scope.$index !== currentCheckIndex" v-model="scope.row.secSalesListNo"
|
|
|
|
|
placeholder="请输入"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="销售发票号(第一票)" prop="firstSalesInvNo">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input :disabled="scope.$index !== currentCheckIndex" v-model="scope.row.firstSalesInvNo"
|
|
|
|
|
placeholder="请输入"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="销售发票号(第二票)" prop="secSalesInvNo">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input :disabled="scope.$index !== currentCheckIndex" v-model="scope.row.secSalesInvNo"
|
|
|
|
|
placeholder="请输入"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="发票日期" prop="invoiceDate">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-date-picker :disabled="scope.$index !== currentCheckIndex" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" v-model="scope.row.invoiceDate" style="width: 100%;"></el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="生产日期" prop="productDate"></el-table-column>
|
|
|
|
|
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
|
|
|
|
|
<el-table-column label="单据数量" prop="count"></el-table-column>
|
|
|
|
|
<el-table-column label="实际数量" prop="reCount"></el-table-column>
|
|
|
|
|
<el-table-column label="价格" width="150" prop="price"></el-table-column>
|
|
|
|
|
<el-table-column label="操作" prop="price">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="handleEdit(scope.$index, scope.row)"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="handleSave(scope.$index, scope.row)"
|
|
|
|
|
>保存
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
@ -195,6 +246,46 @@
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="salesListNoFormVisible">
|
|
|
|
|
<el-form :model="batchForm">
|
|
|
|
|
<label></label>
|
|
|
|
|
<el-form-item label="销售清单:" :label-width="formLabelWidth">
|
|
|
|
|
<el-input style="width: 50%;" v-model="batchForm.secSalesListNo" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="salesListNoFormVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="batchSetParams('1','salesListNo')">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="firstSalesInvNoFormVisible">
|
|
|
|
|
<el-form :model="batchForm">
|
|
|
|
|
<label></label>
|
|
|
|
|
<el-form-item label="销售发票第一票:" :label-width="formLabelWidth">
|
|
|
|
|
<el-input style="width: 50%;" v-model="batchForm.firstSalesInvNo" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="firstSalesInvNoFormVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="batchSetParams('1','firstSalesInvNo')">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="secSalesInvNoFormVisible">
|
|
|
|
|
<el-form :model="batchForm">
|
|
|
|
|
<label></label>
|
|
|
|
|
<el-form-item label="销售发票第二票:" :label-width="formLabelWidth">
|
|
|
|
|
<el-input style="width: 50%;" v-model="batchForm.secSalesInvNo" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="secSalesInvNoFormVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="batchSetParams('1','secSalesInvNo')">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="单据设置"
|
|
|
|
|
:visible.sync="distributionSetVisible"
|
|
|
|
@ -372,7 +463,7 @@ import {
|
|
|
|
|
deleteStockOrderById, deleteStockOrderDetailById,
|
|
|
|
|
copyStockOrderDetail, submitStockOrder,
|
|
|
|
|
uploadStockOrderDetail, uploadStockOrderDetailCount,
|
|
|
|
|
generateStockOrderQRCodeText
|
|
|
|
|
generateStockOrderQRCodeText, updateStockOrderDetail
|
|
|
|
|
} from "../../api/warehouse/stockOrder";
|
|
|
|
|
import stockOrderDistribution from "./stockOrderDistribution";
|
|
|
|
|
import stockOrderQRCodeDetail from "./stockOrderQRCodeDetail";
|
|
|
|
@ -407,6 +498,17 @@ export default {
|
|
|
|
|
busTypes: [],
|
|
|
|
|
list: [],
|
|
|
|
|
detailList: [],
|
|
|
|
|
currentCheckIndex: -1,
|
|
|
|
|
multipId: [],
|
|
|
|
|
batchForm: {
|
|
|
|
|
secSalesListNo: '',
|
|
|
|
|
firstSalesInvNo: '',
|
|
|
|
|
secSalesInvNo: ''
|
|
|
|
|
},
|
|
|
|
|
salesListNoFormVisible: false,
|
|
|
|
|
firstSalesInvNoFormVisible: false,
|
|
|
|
|
secSalesInvNoFormVisible: false,
|
|
|
|
|
formLabelWidth: '120px',
|
|
|
|
|
storageList: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
detailTotal: 0,
|
|
|
|
@ -512,6 +614,80 @@ export default {
|
|
|
|
|
this.query.page = val;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
handleEdit(index, row) {
|
|
|
|
|
this.currentCheckIndex = index;
|
|
|
|
|
console.log(this.currentCheckIndex)
|
|
|
|
|
},
|
|
|
|
|
handleSave(index, row) {
|
|
|
|
|
this.currentCheckIndex = -1;
|
|
|
|
|
|
|
|
|
|
updateStockOrderDetail(row).then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success(res.data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
changeFun(row) {
|
|
|
|
|
let _this = this;
|
|
|
|
|
_this.multipId = []; //每次改动重置ID
|
|
|
|
|
row.forEach((item) => {
|
|
|
|
|
_this.multipId.push(item.id);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
batchSetParams(flag, type) {
|
|
|
|
|
if (flag == '1' && type == 'salesListNo') {
|
|
|
|
|
this.salesListNoFormVisible = false;
|
|
|
|
|
this.detailList.forEach(data => {
|
|
|
|
|
this.multipId.forEach(id => {
|
|
|
|
|
if (data.id == id) {
|
|
|
|
|
data.secSalesListNo = this.batchForm.secSalesListNo;
|
|
|
|
|
//更新到数据库
|
|
|
|
|
updateStockOrderDetail(data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
} else if (flag == '1' && type == 'firstSalesInvNo') {
|
|
|
|
|
this.firstSalesInvNoFormVisible = false;
|
|
|
|
|
this.detailList.forEach(data => {
|
|
|
|
|
this.multipId.forEach(id => {
|
|
|
|
|
if (data.id == id) {
|
|
|
|
|
data.firstSalesInvNo = this.batchForm.firstSalesInvNo;
|
|
|
|
|
//更新到数据库
|
|
|
|
|
updateStockOrderDetail(data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
} else if (flag == '1' && type == 'secSalesInvNo') {
|
|
|
|
|
this.secSalesInvNoFormVisible = false;
|
|
|
|
|
this.detailList.forEach(data => {
|
|
|
|
|
this.multipId.forEach(id => {
|
|
|
|
|
if (data.id == id) {
|
|
|
|
|
data.secSalesInvNo = this.batchForm.secSalesInvNo;
|
|
|
|
|
//更新到数据库
|
|
|
|
|
updateStockOrderDetail(data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
if (this.multipId.length == 0) {
|
|
|
|
|
this.$message.warning("请选择数据");
|
|
|
|
|
} else {
|
|
|
|
|
switch (type) {
|
|
|
|
|
case 'salesListNo':
|
|
|
|
|
this.salesListNoFormVisible = true;
|
|
|
|
|
return;
|
|
|
|
|
case 'firstSalesInvNo':
|
|
|
|
|
this.firstSalesInvNoFormVisible = true;
|
|
|
|
|
return;
|
|
|
|
|
case 'secSalesInvNo':
|
|
|
|
|
this.secSalesInvNoFormVisible = true;
|
|
|
|
|
return;
|
|
|
|
|
default:
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
detailHandleCurrentChange(val) {
|
|
|
|
|
this.query.page = val;
|
|
|
|
|
this.getStockOrderDetailList();
|
|
|
|
|