|
|
@ -28,6 +28,36 @@
|
|
|
|
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
|
|
|
|
<el-input v-model="query.poundCode" placeholder="请输入" clearable> </el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
|
|
<el-form-item label="采购合同编号">
|
|
|
|
|
|
|
|
<el-input v-model="query.purchaseContractNo" placeholder="请输入" clearable>
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
|
|
<el-form-item label="销售合同编号">
|
|
|
|
|
|
|
|
<el-input v-model="query.saleContractNo" placeholder="请输入" clearable> </el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
|
|
<el-form-item label="商品名称">
|
|
|
|
|
|
|
|
<el-input v-model="query.productName" placeholder="请输入" clearable> </el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
|
|
<el-form-item label="客户">
|
|
|
|
|
|
|
|
<el-input v-model="query.customerName" placeholder="请输入" clearable> </el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
|
|
<el-form-item label="结算量">
|
|
|
|
|
|
|
|
<el-input v-model="query.netWeight" placeholder="请输入" clearable> </el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
@ -53,9 +83,7 @@
|
|
|
|
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
|
|
|
|
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
|
|
|
|
v-has="'btn_download'">导出
|
|
|
|
v-has="'btn_download'">导出
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<!-- <el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
|
|
|
|
|
|
|
|
v-has="'btn_batchRemove'">批量删除
|
|
|
|
|
|
|
|
</el-button> -->
|
|
|
|
|
|
|
|
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
|
|
|
|
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
|
|
|
|
@click="createSaleOrder()">生成销售单
|
|
|
|
@click="createSaleOrder()">生成销售单
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
@ -65,6 +93,9 @@
|
|
|
|
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
|
|
|
|
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
|
|
|
|
@click="createPurchaseReceiptVoucher()">生成采购收货凭证
|
|
|
|
@click="createPurchaseReceiptVoucher()">生成采购收货凭证
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
|
|
|
|
|
|
|
|
v-has="'btn_batchRemove'">批量删除
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="JNPF-common-head-right">
|
|
|
|
<div class="JNPF-common-head-right">
|
|
|
|
<el-tooltip content="高级查询" placement="top" v-if="true">
|
|
|
|
<el-tooltip content="高级查询" placement="top" v-if="true">
|
|
|
@ -79,7 +110,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
|
|
|
|
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
|
|
|
|
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column
|
|
|
|
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column
|
|
|
|
border>
|
|
|
|
show-summary :summary-method="getTableSummaries" border>
|
|
|
|
<el-table-column prop="voucherCode" label="凭证编号" align="center" fixed="left" width="160">
|
|
|
|
<el-table-column prop="voucherCode" label="凭证编号" align="center" fixed="left" width="160">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="单据类型" prop="documentType1" align="center" fixed="left"
|
|
|
|
<el-table-column label="单据类型" prop="documentType1" align="center" fixed="left"
|
|
|
@ -107,11 +138,9 @@
|
|
|
|
</el-table-column> -->
|
|
|
|
</el-table-column> -->
|
|
|
|
<el-table-column prop="businessOrderNo" label="关联销售订单" align="center" width="160">
|
|
|
|
<el-table-column prop="businessOrderNo" label="关联销售订单" align="center" width="160">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="voucherProductList[0].netWeight" label="结算量" align="center"
|
|
|
|
<el-table-column prop="netWeight" label="结算量" align="center" width="120">
|
|
|
|
width="120">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="voucherProductList[0].clearWeight" label="净重" align="center"
|
|
|
|
<el-table-column prop="clearWeight" label="净重" align="center" width="120">
|
|
|
|
width="120">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="customerName1" label="客户" align="center" width="200">
|
|
|
|
<el-table-column prop="customerName1" label="客户" align="center" width="200">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
@ -281,10 +310,14 @@ export default {
|
|
|
|
uploadBoxVisible: false,
|
|
|
|
uploadBoxVisible: false,
|
|
|
|
detailVisible: false,
|
|
|
|
detailVisible: false,
|
|
|
|
query: {
|
|
|
|
query: {
|
|
|
|
|
|
|
|
purchaseContractNo: undefined,
|
|
|
|
|
|
|
|
saleContractNo: undefined,
|
|
|
|
voucherCode: undefined,
|
|
|
|
voucherCode: undefined,
|
|
|
|
voucherType: undefined,
|
|
|
|
voucherType: undefined,
|
|
|
|
preparationTime: undefined,
|
|
|
|
preparationTime: undefined,
|
|
|
|
poundCode: undefined,
|
|
|
|
poundCode: undefined,
|
|
|
|
|
|
|
|
customerName: undefined,
|
|
|
|
|
|
|
|
netWeight: undefined,
|
|
|
|
businessType: "2",
|
|
|
|
businessType: "2",
|
|
|
|
documentType: "2"
|
|
|
|
documentType: "2"
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -645,6 +678,43 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
getTableSummaries(param) {
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
|
|
|
columns,
|
|
|
|
|
|
|
|
data
|
|
|
|
|
|
|
|
} = param;
|
|
|
|
|
|
|
|
const sums = [];
|
|
|
|
|
|
|
|
columns.forEach((column, index) => {
|
|
|
|
|
|
|
|
if (index === 0) {
|
|
|
|
|
|
|
|
sums[index] = '合计';
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else if (["netWeight"].includes(column.property)) {
|
|
|
|
|
|
|
|
const values = data.map(item => {
|
|
|
|
|
|
|
|
if (column.property.includes('.')) {
|
|
|
|
|
|
|
|
const [attr1, attr2] = column.property.split('.')
|
|
|
|
|
|
|
|
return Number(item[attr1][attr2])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return Number(item[column.property])
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!values.every(value => isNaN(value))) {
|
|
|
|
|
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
|
|
|
|
|
const value = Number(curr);
|
|
|
|
|
|
|
|
if (!isNaN(value)) {
|
|
|
|
|
|
|
|
return prev + curr;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return prev;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 0).toFixed(2);
|
|
|
|
|
|
|
|
if ([].includes(column.property)) {
|
|
|
|
|
|
|
|
sums[index] = thousandsFormat(sums[index]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
sums[index] = '';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return sums;
|
|
|
|
|
|
|
|
},
|
|
|
|
getColumnList() {
|
|
|
|
getColumnList() {
|
|
|
|
// 没有开启权限
|
|
|
|
// 没有开启权限
|
|
|
|
this.columnOptions = this.transformColumnList(this.columnList)
|
|
|
|
this.columnOptions = this.transformColumnList(this.columnList)
|
|
|
@ -822,6 +892,22 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const selectData = this.multipleSelectionItem
|
|
|
|
|
|
|
|
let isSaleFlag = true
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
selectData.forEach(function (item) {
|
|
|
|
|
|
|
|
if (item.isTransfer == '2') {
|
|
|
|
|
|
|
|
isSaleFlag = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!isSaleFlag) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
|
|
message: '凭证已生成销售单',
|
|
|
|
|
|
|
|
duration: 1500,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
const ids = this.multipleSelection
|
|
|
|
const ids = this.multipleSelection
|
|
|
|
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
|
|
|
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|