|
@@ -21,10 +21,10 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="审核时间">
|
|
|
- <rangeDate ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
+ <a-form-item label="审核时间">
|
|
|
+ <rangeDate ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="出库时间">
|
|
@@ -85,148 +85,149 @@
|
|
|
<v-select code="FLAG" id="salesManagementList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
+ <a-col :span="12" style="margin:10px 0;">
|
|
|
+ <a-checkbox v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
|
|
|
+ <a-popover placement="right">
|
|
|
+ <template slot="content">
|
|
|
+ 使用此查询时,时间可清空,必须选择一个客户
|
|
|
+ </template>
|
|
|
+ <a-icon type="question-circle" />
|
|
|
+ </a-popover>
|
|
|
+ </a-col>
|
|
|
</template>
|
|
|
<a-col :span="24" style="display:flex;justify-content: center;align-items: center;">
|
|
|
<a-button type="primary" :disabled="disabled" @click="searchForm">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- v-if="$hasPermissions('B_salesExport')"
|
|
|
- class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
- :disabled="disabled"
|
|
|
- :loading="exportLoading"
|
|
|
- id="salesManagementList-export">导出</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
- </a>
|
|
|
+ <a-button style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ v-if="$hasPermissions('B_salesExport')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ id="salesManagementList-export">导出</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
</a-card>
|
|
|
-
|
|
|
- <a-card size="small" :bordered="false">
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
- <!-- 操作按钮 -->
|
|
|
- <div class="table-operator">
|
|
|
- <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)">新增(零售)</a-button>
|
|
|
- <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)">新增(铺货)</a-button>
|
|
|
- <a-checkbox style="margin-left:10px;" v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
|
|
|
- <a-popover placement="right">
|
|
|
- <template slot="content">
|
|
|
- 使用此查询时,时间可清空,必须选择一个客户
|
|
|
- </template>
|
|
|
- <a-icon type="question-circle" />
|
|
|
- </a-popover>
|
|
|
|
|
|
- </div>
|
|
|
- <a-alert type="info" style="margin-bottom:10px">
|
|
|
- <div slot="message">
|
|
|
- 总售价:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>元;
|
|
|
- 总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
|
|
|
- 总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
|
|
|
- 总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
+ <a-card size="small" :bordered="false">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <div style="display: flex;align-items: center;margin-bottom:10px;">
|
|
|
+ <div>
|
|
|
+ 总售价:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>元;
|
|
|
+ 总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
|
|
|
+ 总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
|
|
|
+ 总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
+ </div>
|
|
|
+ <div style="flex:1;text-align: right;">
|
|
|
+ <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)">新增(零售)</a-button>
|
|
|
+ <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)">新增(铺货)</a-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </a-alert>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable fixPagination"
|
|
|
- ref="table"
|
|
|
- :style="{ height: tableHeight+77+'px' }"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ y:tableHeight }"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>
|
|
|
- <!-- 销售单号 -->
|
|
|
- <template slot="salesBillNo" slot-scope="text, record">
|
|
|
- <span class="table-td-link" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
- <span v-else>{{ record.salesBillNo }}</span>
|
|
|
- <a-badge count="改" :offset="[10,0]" v-if="record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
|
|
|
- </template>
|
|
|
- <!-- 审核 -->
|
|
|
- <template slot="audit" slot-scope="text, record">
|
|
|
- <stateIcon :title="record.billStatusDictValue" v-if="record.billStatus!='AUDIT_REJECT'" :state="record.billStatus == 'WAIT_OUT_WAREHOUSE'||record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
|
- <stateIcon :title="record.billStatusDictValue" v-else :state="0"></stateIcon>
|
|
|
- </template>
|
|
|
- <!-- 急件 -->
|
|
|
- <template slot="oosFlag" slot-scope="text, record">
|
|
|
- <stateIcon :state="record.oosFlag==1?'1':'2'"></stateIcon>
|
|
|
- </template>
|
|
|
- <!-- 出库 -->
|
|
|
- <template slot="waitOut" slot-scope="text, record">
|
|
|
- <stateIcon :state="record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
|
- </template>
|
|
|
- <!-- 收款 -->
|
|
|
- <template slot="financial" slot-scope="text, record">
|
|
|
- <stateIcon :title="record.financialStatusDictValue" :state="record.financialStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
|
- </template>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-primary"
|
|
|
- v-if="record.billStatus == 'WAIT_AUDIT' && $hasPermissions('B_salesAudit')"
|
|
|
- @click="handleEexamine(record)"
|
|
|
- >审核</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_salesStockOut')"
|
|
|
- class="button-primary"
|
|
|
- @click="handleSend(record)"
|
|
|
- >出库</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-primary"
|
|
|
- v-if="((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')) && $hasPermissions('B_salesEdit')"
|
|
|
- @click="handleEdit(record)"
|
|
|
- >
|
|
|
- 编辑
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-error"
|
|
|
- v-if="((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && record.billStatus != 'FINISH') && $hasPermissions('B_salesDel')"
|
|
|
- @click="handleDel(record)"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-primary"
|
|
|
- v-if="(record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesEdit')"
|
|
|
- @click="handleEdit(record)"
|
|
|
- >
|
|
|
- 改单
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-error"
|
|
|
- v-if="(record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesDel')"
|
|
|
- @click="handleDel(record, 'cancel')"
|
|
|
- >
|
|
|
- 取消
|
|
|
- </a-button>
|
|
|
- <span v-if="!(record.billStatus == 'WAIT_AUDIT' && $hasPermissions('B_salesAudit')) && !(record.billStatus == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_salesStockOut')) && !(((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')) && $hasPermissions('B_salesEdit')) && !(((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && record.billStatus != 'FINISH') && $hasPermissions('B_salesDel')) && !((record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesEdit')) && !((record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesDel'))">--</span>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-spin>
|
|
|
- <!-- 选择客户弹框 -->
|
|
|
- <choose-custom-modal :show="openModal" :distributionFlag="distributionFlag" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
|
|
|
- <!-- 审核 -->
|
|
|
- <auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
|
|
|
- </a-card>
|
|
|
-</div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable fixPagination"
|
|
|
+ ref="table"
|
|
|
+ :style="{ height: tableHeight+77+'px' }"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ y:tableHeight }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 销售单号 -->
|
|
|
+ <template slot="salesBillNo" slot-scope="text, record">
|
|
|
+ <span class="table-td-link" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
+ <span v-else>{{ record.salesBillNo }}</span>
|
|
|
+ <a-badge count="改" :offset="[10,0]" v-if="record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
|
|
|
+ </template>
|
|
|
+ <!-- 审核 -->
|
|
|
+ <template slot="audit" slot-scope="text, record">
|
|
|
+ <stateIcon :title="record.billStatusDictValue" v-if="record.billStatus!='AUDIT_REJECT'" :state="record.billStatus == 'WAIT_OUT_WAREHOUSE'||record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
|
+ <stateIcon :title="record.billStatusDictValue" v-else :state="0"></stateIcon>
|
|
|
+ </template>
|
|
|
+ <!-- 急件 -->
|
|
|
+ <template slot="oosFlag" slot-scope="text, record">
|
|
|
+ <stateIcon :state="record.oosFlag==1?'1':'2'"></stateIcon>
|
|
|
+ </template>
|
|
|
+ <!-- 出库 -->
|
|
|
+ <template slot="waitOut" slot-scope="text, record">
|
|
|
+ <stateIcon :state="record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
|
+ </template>
|
|
|
+ <!-- 收款 -->
|
|
|
+ <template slot="financial" slot-scope="text, record">
|
|
|
+ <stateIcon :title="record.financialStatusDictValue" :state="record.financialStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ v-if="record.billStatus == 'WAIT_AUDIT' && $hasPermissions('B_salesAudit')"
|
|
|
+ @click="handleEexamine(record)"
|
|
|
+ >审核</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_salesStockOut')"
|
|
|
+ class="button-primary"
|
|
|
+ @click="handleSend(record)"
|
|
|
+ >出库</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ v-if="((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')) && $hasPermissions('B_salesEdit')"
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-error"
|
|
|
+ v-if="((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && record.billStatus != 'FINISH') && $hasPermissions('B_salesDel')"
|
|
|
+ @click="handleDel(record)"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ v-if="(record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesEdit')"
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ >
|
|
|
+ 改单
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-error"
|
|
|
+ v-if="(record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesDel')"
|
|
|
+ @click="handleDel(record, 'cancel')"
|
|
|
+ >
|
|
|
+ 取消
|
|
|
+ </a-button>
|
|
|
+ <span v-if="!(record.billStatus == 'WAIT_AUDIT' && $hasPermissions('B_salesAudit')) && !(record.billStatus == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_salesStockOut')) && !(((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')) && $hasPermissions('B_salesEdit')) && !(((record.sourceType == 'SATELLITE' || record.sourceType == 'SALES' || record.sourceType == 'TEMPORARY_DISPATCHING') && record.billStatus != 'FINISH') && $hasPermissions('B_salesDel')) && !((record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesEdit')) && !((record.sourceType == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesDel'))">--</span>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
+ <!-- 选择客户弹框 -->
|
|
|
+ <choose-custom-modal :show="openModal" :distributionFlag="distributionFlag" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
|
|
|
+ <!-- 审核 -->
|
|
|
+ <auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|