|
|
@@ -60,10 +60,7 @@
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
class="ele-btn-icon"
|
|
|
- v-if="$hasPermission('eom:saleManage:invoiceAll')"
|
|
|
-
|
|
|
@click="invoiceAll"
|
|
|
-
|
|
|
:disabled="selection?.length === 0"
|
|
|
>
|
|
|
批量发货
|
|
|
@@ -662,19 +659,30 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- invoiceAll(){
|
|
|
+ invoiceAll() {
|
|
|
let partaIds = this.selection.map((item) => item.partaId);
|
|
|
- if (new Set(partaIds).size != 1) {
|
|
|
- return this.$message.warning('请选择相同客户的订单!');
|
|
|
- }
|
|
|
- if (
|
|
|
- this.selection.filter((item) => item.needProduce == 4)?.length &&
|
|
|
- this.selection.filter((item) => item.needProduce == 4)?.length !=
|
|
|
- this.selection.length
|
|
|
- ) {
|
|
|
- return this.$message.warning('不定向订单不能与其它类型的订单一起创建发货单!');
|
|
|
- }
|
|
|
- this.$refs.invoiceDialogRef.open('add', {}, this.selection.map((item) => item.id));
|
|
|
+ if (new Set(partaIds).size != 1) {
|
|
|
+ return this.$message.warning('请选择相同客户的订单!');
|
|
|
+ }
|
|
|
+ let saleTypeS = this.selection.map((item) => item.saleType);
|
|
|
+ if (new Set(saleTypeS).size != 1) {
|
|
|
+ return this.$message.warning('请选择相同销售类型的订单!');
|
|
|
+ }
|
|
|
+
|
|
|
+ if (
|
|
|
+ this.selection.filter((item) => item.needProduce == 4)?.length &&
|
|
|
+ this.selection.filter((item) => item.needProduce == 4)?.length !=
|
|
|
+ this.selection.length
|
|
|
+ ) {
|
|
|
+ return this.$message.warning(
|
|
|
+ '不定向订单不能与其它类型的订单一起创建发货单!'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ this.$refs.invoiceDialogRef.open(
|
|
|
+ 'add',
|
|
|
+ {},
|
|
|
+ this.selection.map((item) => item.id)
|
|
|
+ );
|
|
|
},
|
|
|
//点击左边分类
|
|
|
handleNodeClick(data, node) {
|