|
@@ -83,8 +83,20 @@
|
|
|
<template v-if="threeList.length">
|
|
|
<a-row :gutter="[16, 8]">
|
|
|
<a-col class="gutter-row" v-for="item in threeList" :key="item.id">
|
|
|
- <div class="ticket next-ticket" :class="{ disabled: !!item.confirmTime }">
|
|
|
- <div class="ticket-op-w" v-if="!isAuth">
|
|
|
+ <div class="ticket next-ticket" :class="{ disabled: !!item.confirmTime, 'back-disabled': item.withdrawStatus === 1 }">
|
|
|
+ <div class="ticket-op-w flex" v-if="!isAuth">
|
|
|
+ <div class="ticket-op flex-1">
|
|
|
+ <a-button
|
|
|
+ :disabled="!!item.confirmTime || item.withdrawStatus === 1"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ danger
|
|
|
+ @click="confirmBackCard(item)"
|
|
|
+ >
|
|
|
+ <Icon icon="ant-design:rotate-left-outlined" />
|
|
|
+ 回退
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
<a-button type="primary" :disabled="!!item.confirmTime" size="small" @click="confirmCard(item)">确认装运单</a-button>
|
|
|
<a-button
|
|
|
type="primary"
|
|
@@ -188,10 +200,25 @@
|
|
|
<a-textarea v-model:value="remark" placeholder="备注" :auto-size="{ minRows: 2, maxRows: 5 }" />
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
+
|
|
|
+ <!-- 回退 -->
|
|
|
+ <a-modal v-model:open="backOpen" title="回退装运单" ok-text="确认" cancel-text="取消" @ok="confirmBackSubmit">
|
|
|
+ <div style="margin: 20px">
|
|
|
+ <div style="color: #f50; margin-bottom: 10px">说明:一经确认,装运单信息无法修改。</div>
|
|
|
+ <a-textarea v-model:value="backRemark" placeholder="回退理由" :auto-size="{ minRows: 2, maxRows: 5 }" />
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
import { onMounted, ref } from 'vue';
|
|
|
- import { getStorageBillPrintList, saveStorageBillPrint, getrollClubStatistics, exportThreeExcel, exportOutExcel } from './dashboard.api';
|
|
|
+ import {
|
|
|
+ getStorageBillPrintList,
|
|
|
+ saveStorageBillPrint,
|
|
|
+ getrollClubStatistics,
|
|
|
+ exportThreeExcel,
|
|
|
+ exportOutExcel,
|
|
|
+ goBackStorageBill,
|
|
|
+ } from './dashboard.api';
|
|
|
import dayjs, { Dayjs } from 'dayjs';
|
|
|
import { useForm, BasicForm, FormSchema } from '/@/components/Form';
|
|
|
import SegmentedSelect from '/@/components/SegmentedSelect/index.vue';
|
|
@@ -208,10 +235,12 @@
|
|
|
import { list } from '../ShiftPerformance/ShiftPerformance.api';
|
|
|
import { getTeamShift } from '../Dashboard/dashboard.api';
|
|
|
import { useMethods } from '/@/hooks/system/useMethods';
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
|
|
// 导入导出方法
|
|
|
const { handleExportXlsx } = useMethods();
|
|
|
const userStore = useUserStore();
|
|
|
+ const { createMessage } = useMessage();
|
|
|
|
|
|
const isAuth = userStore.userInfo && userStore.userInfo.username === '5';
|
|
|
|
|
@@ -241,6 +270,15 @@
|
|
|
colProps: { span: 6 },
|
|
|
slot: 'ccmNo',
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '日期',
|
|
|
+ field: 'arrivalTime',
|
|
|
+ component: 'RangePicker',
|
|
|
+ componentProps: {
|
|
|
+ showTime: true,
|
|
|
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
label: '炉号',
|
|
|
field: 'heatNo',
|
|
@@ -257,7 +295,7 @@
|
|
|
component: 'Input',
|
|
|
},
|
|
|
{
|
|
|
- label: '类型',
|
|
|
+ label: '钢坯类型',
|
|
|
field: 'btype',
|
|
|
component: 'JDictSelectTag',
|
|
|
componentProps: {
|
|
@@ -266,19 +304,19 @@
|
|
|
colProps: { span: 6 },
|
|
|
},
|
|
|
{
|
|
|
- label: '日期',
|
|
|
- field: 'arrivalTime',
|
|
|
- component: 'RangePicker',
|
|
|
+ label: '牌号',
|
|
|
+ field: 'brandNum',
|
|
|
+ component: 'JDictSelectTag',
|
|
|
componentProps: {
|
|
|
- showTime: true,
|
|
|
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
+ dictCode: 'billet_spec',
|
|
|
},
|
|
|
+ colProps: { span: 6 },
|
|
|
},
|
|
|
{
|
|
|
label: '',
|
|
|
field: 'zidingyi',
|
|
|
component: 'Input',
|
|
|
- colProps: { span: 12 },
|
|
|
+ colProps: { span: 6 },
|
|
|
slot: 'zidingyi',
|
|
|
},
|
|
|
{
|
|
@@ -471,6 +509,34 @@
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+ // 回退装运单
|
|
|
+ const backOpen = ref(false);
|
|
|
+ const confirmBackInfo = ref({});
|
|
|
+ const backRemark = ref('');
|
|
|
+ const confirmBackCard = (record) => {
|
|
|
+ backOpen.value = true;
|
|
|
+ confirmBackInfo.value = record;
|
|
|
+ backRemark.value = '';
|
|
|
+ };
|
|
|
+ const confirmBackSubmit = () => {
|
|
|
+ const info: any = confirmBackInfo.value;
|
|
|
+ if (!backRemark.value.trim()) {
|
|
|
+ createMessage.error('请填写回退原因');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ goBackStorageBill({
|
|
|
+ id: info.recordId,
|
|
|
+ withdrawStatus: 1,
|
|
|
+ remark: remark.value,
|
|
|
+ storageBillId: info.id,
|
|
|
+ btype: info.btype,
|
|
|
+ }).then(() => {
|
|
|
+ backOpen.value = false;
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
// 明细展示
|
|
|
const defaultDtl = [
|
|
|
{
|
|
@@ -706,10 +772,21 @@
|
|
|
background: #e9e9e9;
|
|
|
}
|
|
|
|
|
|
+ &.back-disabled {
|
|
|
+ background: #ffc6a9;
|
|
|
+ }
|
|
|
+
|
|
|
.ticket-op-w {
|
|
|
margin-bottom: 10px;
|
|
|
text-align: right;
|
|
|
|
|
|
+ .ticket-op {
|
|
|
+ text-align: left;
|
|
|
+ .ant-btn {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.ant-btn {
|
|
|
margin-left: 20px;
|
|
|
}
|