|
@@ -231,6 +231,129 @@
|
|
|
<auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
|
|
|
</a-card>
|
|
|
</div>
|
|
|
+=======
|
|
|
+
|
|
|
+ <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>;
|
|
|
+ </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>
|
|
|
+>>>>>>> f38798f6f1455645ee8f60cd786bd551e3a2d404
|
|
|
</template>
|
|
|
|
|
|
<script>
|