|
@@ -18,6 +18,18 @@
|
|
|
<Icon icon="ant-design:delete-outlined" />
|
|
|
删除
|
|
|
</a-menu-item>
|
|
|
+ <a-menu-item key="2" @click="batchSubmitBatch">
|
|
|
+ <Icon icon="ant-design:submit-outlined" />
|
|
|
+ 提交
|
|
|
+ </a-menu-item>
|
|
|
+ <a-menu-item key="3" @click="batchReturnSubmitBatch">
|
|
|
+ <Icon icon="ant-design:commit-outlined" />
|
|
|
+ 取消提交
|
|
|
+ </a-menu-item>
|
|
|
+ <a-menu-item key="4" @click="showCloseModal">
|
|
|
+ <Icon icon="ant-design:close-outlined" />
|
|
|
+ 关闭
|
|
|
+ </a-menu-item>
|
|
|
</a-menu>
|
|
|
</template>
|
|
|
<a-button v-auth="'saleCode:sale_interface_sync:deleteBatch'"
|
|
@@ -26,7 +38,7 @@
|
|
|
</a-button>
|
|
|
</a-dropdown>
|
|
|
<!-- 高级查询 -->
|
|
|
- <super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
|
|
+ <!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" /> -->
|
|
|
<!-- 获取接口数据 -->
|
|
|
<a-button type="primary" v-auth="'saleCode:sale_interface_sync:deleteBatch'" @click="showSyncModal">获取接口数据</a-button>
|
|
|
<!-- 同步订单 -->
|
|
@@ -41,6 +53,20 @@
|
|
|
</BasicTable>
|
|
|
<!-- 表单区域 -->
|
|
|
<SaleInterfaceSyncModal @register="registerModal" @success="handleSuccess" />
|
|
|
+ <!-- 关闭弹窗 -->
|
|
|
+ <a-modal v-model:open="closeVisiable" title="关闭原因(Close reason)" centered @ok="batchSubmitClose">
|
|
|
+ <div style="padding: 20px">
|
|
|
+ <a-form ref="closeFormRef" :model="closeForm" :rules="closeRules" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :md="24" :sm="24">
|
|
|
+ <a-form-item label="关闭原因" required name="closeInfo">
|
|
|
+ <a-textarea v-model:value="closeForm.closeInfo" placeholder="" :rows="4" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
<!-- 获取接口弹窗 -->
|
|
|
<a-modal v-model:open="syncVisiable" title="获取接口数据" centered @ok="handleSyncOk">
|
|
|
<div style="padding: 20px">
|
|
@@ -51,8 +77,8 @@
|
|
|
type="date"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
- valueFormat="YYYY-MM-DD HH:mm:ss"
|
|
|
- format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ valueFormat="YYYY-MM-DD"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
show-time
|
|
|
/>
|
|
|
</a-form-item>
|
|
@@ -62,8 +88,8 @@
|
|
|
type="date"
|
|
|
placeholder=""
|
|
|
style="width: 100%"
|
|
|
- valueFormat="YYYY-MM-DD HH:mm:ss"
|
|
|
- format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ valueFormat="YYYY-MM-DD"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
show-time
|
|
|
/>
|
|
|
</a-form-item>
|
|
@@ -80,7 +106,12 @@
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import SaleInterfaceSyncModal from './components/SaleInterfaceSyncModal.vue';
|
|
|
import { columns, searchFormSchema, superQuerySchema } from './SaleInterfaceSync.data';
|
|
|
- import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getData, getSyncOrder } from './SaleInterfaceSync.api';
|
|
|
+ import { list, deleteOne, batchDelete, getImportUrl, getExportUrl
|
|
|
+ , getData
|
|
|
+ , getSyncOrder
|
|
|
+ , submitBatch
|
|
|
+ , returnSubmitBatch
|
|
|
+ , submitClose } from './SaleInterfaceSync.api';
|
|
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import { useUserStore } from '/@/store/modules/user';
|
|
@@ -181,6 +212,30 @@
|
|
|
async function batchHandleDelete() {
|
|
|
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 批量提交事件
|
|
|
+ */
|
|
|
+ async function batchSubmitBatch() {
|
|
|
+ if (selectedRowKeys.value.length == 0) {
|
|
|
+ message.warning('请选择数据');
|
|
|
+ } else {
|
|
|
+ var ids = selectedRowKeys.value.join(',');
|
|
|
+ await submitBatch({ ids: ids }, handleSuccess);
|
|
|
+ }
|
|
|
+ // await submitBatch({ ids: selectedRowKeys.value }, handleSuccess);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 批量取消提交事件
|
|
|
+ */
|
|
|
+ async function batchReturnSubmitBatch() {
|
|
|
+ if (selectedRowKeys.value.length == 0) {
|
|
|
+ message.warning('请选择数据');
|
|
|
+ } else {
|
|
|
+ var ids = selectedRowKeys.value.join(',');
|
|
|
+ await returnSubmitBatch({ ids: ids }, handleSuccess);
|
|
|
+ }
|
|
|
+ // await returnSubmitBatch({ ids: selectedRowKeys.value }, handleSuccess);
|
|
|
+ }
|
|
|
/**
|
|
|
* 成功回调
|
|
|
*/
|
|
@@ -209,31 +264,41 @@
|
|
|
label: '详情',
|
|
|
onClick: handleDetail.bind(null, record),
|
|
|
},
|
|
|
- {
|
|
|
- label: '删除',
|
|
|
- popConfirm: {
|
|
|
- title: '是否确认删除',
|
|
|
- confirm: handleDelete.bind(null, record),
|
|
|
- placement: 'topLeft',
|
|
|
- },
|
|
|
- auth: 'saleCode:sale_interface_sync:delete',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: '删除',
|
|
|
+ // popConfirm: {
|
|
|
+ // title: '是否确认删除',
|
|
|
+ // confirm: handleDelete.bind(null, record),
|
|
|
+ // placement: 'topLeft',
|
|
|
+ // },
|
|
|
+ // auth: 'saleCode:sale_interface_sync:delete',
|
|
|
+ // },
|
|
|
];
|
|
|
}
|
|
|
|
|
|
const syncVisiable = ref(false);
|
|
|
+ const closeVisiable = ref(false);
|
|
|
+ const closeForm = ref({});
|
|
|
const syncForm = ref({});
|
|
|
const syncRules = {
|
|
|
requestedDeliveryDate: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
|
|
|
adviseBeforeDate: [{ required: true, message: '请选择结束时间', trigger: 'blur' }],
|
|
|
};
|
|
|
+ const closeRules = {
|
|
|
+ closeInfo: [{ required: true, message: '请填写关闭原因', trigger: 'blur' }]
|
|
|
+ };
|
|
|
const syncFormRef = ref();
|
|
|
+ const closeFormRef = ref();
|
|
|
const labelCol = { span: 5 };
|
|
|
const wrapperCol = { span: 13 };
|
|
|
const showSyncModal = () => {
|
|
|
syncForm.value = {};
|
|
|
syncVisiable.value = true;
|
|
|
};
|
|
|
+ const showCloseModal = () => {
|
|
|
+ closeForm.value = {};
|
|
|
+ closeVisiable.value = true;
|
|
|
+ };
|
|
|
const handleSyncOk = () => {
|
|
|
syncFormRef.value.validate().then(() => {
|
|
|
getData(syncForm.value).then((res) => {
|
|
@@ -259,6 +324,28 @@
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量关闭事件
|
|
|
+ */
|
|
|
+ async function batchSubmitClose() {
|
|
|
+
|
|
|
+
|
|
|
+ if (selectedRowKeys.value.length == 0) {
|
|
|
+ message.warning('请选择数据');
|
|
|
+ } else {
|
|
|
+ var ids = selectedRowKeys.value.join(',');
|
|
|
+
|
|
|
+ closeFormRef.value.validate().then(() => {
|
|
|
+ submitClose({ ids: ids,closeInfo:closeForm.value.closeInfo}, handleSuccess);
|
|
|
+ closeVisiable.value = false;
|
|
|
+ });
|
|
|
+
|
|
|
+ // await submitClose({ ids: ids }, handleSuccess);
|
|
|
+ }
|
|
|
+ // // await submitClose({ ids: selectedRowKeys.value }, handleSuccess);
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|