|
@@ -87,25 +87,40 @@
|
|
|
<a @click="onDetail(record, true)" v-if="hasPerm('qyRecordView')">查看</a>
|
|
|
<a-divider type="vertical"
|
|
|
v-if="hasPerm('qyRecordView') && hasPerm(['qyRecordEdit', 'qyRecordDelete'], 'or')"/>
|
|
|
- <a @click="onDetail(record)" v-if="hasPerm('qyRecordEdit')">编辑</a>
|
|
|
+ <a @click="onDetail(record)" v-if="hasPerm('qyRecordEdit') && record.status == 1">编辑</a>
|
|
|
<a-divider type="vertical" v-if="hasPerm(['qyRecordEdit', 'qyRecordDelete'], 'and')"/>
|
|
|
<a-popconfirm title="确定要删除吗?" @confirm="deleteQyRecord(record)">
|
|
|
<a-button type="link" danger size="small" v-if="hasPerm('qyRecordDelete')">删除</a-button>
|
|
|
</a-popconfirm>
|
|
|
+ <a-divider type="vertical" v-if="hasPerm(['qyRecordView', 'qyRecordEdit', 'qyRecordDelete'])"/>
|
|
|
+ <a @click="resultDetailRef.onOpen(record)" v-if="record.status == 3 || record.status == 4">查看回执</a>
|
|
|
+ <template v-if="searchFormState.qybalx === 'bgsq' && (record.status == 3 || record.status == 4)">
|
|
|
+ <a-divider type="vertical"/>
|
|
|
+ <a @click="onChange(record)">变更</a>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="searchFormState.qybalx === 'zxsq' && record.status == 4">
|
|
|
+ <a-divider type="vertical"/>
|
|
|
+ <a @click="onKill(record)">注销</a>
|
|
|
+ </template>
|
|
|
</a-space>
|
|
|
</template>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-card>
|
|
|
<Detail v-else ref="detailRef" @onClose="indexShow = true" @successful="onSearch()"/>
|
|
|
+ <ResultDetail ref="resultDetailRef"/>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="qyrecord">
|
|
|
import tool from '@/utils/tool'
|
|
|
import {cloneDeep} from 'lodash-es'
|
|
|
import Detail from './detail.vue'
|
|
|
+import ResultDetail from './result.vue'
|
|
|
import qyRecordApi from '@/api/yqyc/qyRecordApi'
|
|
|
import downloadUtil from "@/utils/downloadUtil";
|
|
|
+import {message, Modal} from "ant-design-vue";
|
|
|
+import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
|
|
|
+import {createVNode} from "vue";
|
|
|
|
|
|
const {proxy} = getCurrentInstance()
|
|
|
const searchFormState = ref({
|
|
@@ -116,51 +131,57 @@ const searchFormRef = ref()
|
|
|
const tableRef = ref()
|
|
|
const filterParam = ref({})
|
|
|
const detailRef = ref()
|
|
|
+const resultDetailRef = ref()
|
|
|
const indexShow = ref(true)
|
|
|
const toolConfig = {refresh: true, height: true, columnSetting: true, striped: false}
|
|
|
-const columns = [
|
|
|
- {
|
|
|
- title: '统一社会信用代码',
|
|
|
- dataIndex: 'companyCode',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '企业注册名称',
|
|
|
- dataIndex: 'companyName',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '申报企业编号',
|
|
|
- dataIndex: 'companyApplyCode',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '主管海关',
|
|
|
- dataIndex: 'companyMainHgType',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '申报类型',
|
|
|
- dataIndex: 'applyType',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '申报时间',
|
|
|
- dataIndex: 'applyTime',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '单据状态',
|
|
|
- dataIndex: 'status',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '录入时间',
|
|
|
- dataIndex: 'createTime',
|
|
|
- },
|
|
|
-]
|
|
|
+const columns = ref([
|
|
|
+ {
|
|
|
+ title: '统一社会信用代码',
|
|
|
+ dataIndex: 'companyCode',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '企业注册名称',
|
|
|
+ dataIndex: 'companyName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '申报企业编号',
|
|
|
+ dataIndex: 'companyApplyCode',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '主管海关',
|
|
|
+ dataIndex: 'companyMainHgType',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '申报类型',
|
|
|
+ dataIndex: 'applyType',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '申报时间',
|
|
|
+ dataIndex: 'applyTime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单据状态',
|
|
|
+ dataIndex: 'status',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '录入时间',
|
|
|
+ dataIndex: 'createTime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ align: 'center',
|
|
|
+ width: 200,
|
|
|
+ fixed: 'right',
|
|
|
+ }
|
|
|
+])
|
|
|
// 操作栏通过权限判断是否显示
|
|
|
-if (hasPerm(['qyRecordEdit', 'qyRecordDelete'])) {
|
|
|
- columns.push({
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'action',
|
|
|
- align: 'center',
|
|
|
- width: 200,
|
|
|
- fixed: 'right',
|
|
|
- })
|
|
|
+if (hasPerm(['qyRecordView', 'qyRecordEdit', 'qyRecordDelete'])) {
|
|
|
+ columns.value.forEach(v => {
|
|
|
+ if (v.dataIndex === 'action') {
|
|
|
+ v.width = 400
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
const selectedRowKeys = ref([])
|
|
|
// 列表选择配置
|
|
@@ -252,6 +273,39 @@ const onDetail = (record = null, view) => {
|
|
|
detailRef.value.onOpen(record, view)
|
|
|
})
|
|
|
}
|
|
|
+// 变更
|
|
|
+const onChange = (record = null) => {
|
|
|
+ Modal.confirm({
|
|
|
+ title: '请确定是否变更?',
|
|
|
+ icon: createVNode(ExclamationCircleOutlined),
|
|
|
+ content: createVNode('div', { style: 'color:red;' }, '变更后将重新进行申报'),
|
|
|
+ centered: true,
|
|
|
+ onOk() {
|
|
|
+ onDetail(record)
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+// 注销
|
|
|
+const onKill = (record = null) => {
|
|
|
+ Modal.confirm({
|
|
|
+ title: '确定要对该企业进行注销操作?',
|
|
|
+ icon: createVNode(ExclamationCircleOutlined),
|
|
|
+ content: createVNode('div', { style: 'color:red;' }, '注销后将该公司将无法进行报关申请等操作'),
|
|
|
+ centered: true,
|
|
|
+ onOk() {
|
|
|
+ let recordData = cloneDeep(record)
|
|
|
+ recordData.applyTime = proxy.$util.YMDHms(new Date())
|
|
|
+ recordData.status = '2'
|
|
|
+ qyRecordApi.qyRecordSubmitForm(recordData, recordData.id).then(() => {
|
|
|
+ onSearch()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
const companyMainHgTypeOptions = tool.dictList('zhhg')
|
|
|
const statusOptions = tool.dictList('djzt')
|
|
|
</script>
|