54bc282a by lihua

数据交付接口联调

1 parent b4b18a68
...@@ -12,4 +12,23 @@ export const deleteDeliveryContract = (params) => request({ ...@@ -12,4 +12,23 @@ export const deleteDeliveryContract = (params) => request({
12 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/delete`, 12 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/delete`,
13 method: 'delete', 13 method: 'delete',
14 data: params 14 data: params
15 });
...\ No newline at end of file ...\ No newline at end of file
15 });
16
17 /** 获取查看核验信息明细接口 */
18 export const getDeliveryVerifyDetail = (guid) => request({
19 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/verify-detail?deliveryGuid=${guid}`,
20 method: 'get'
21 });
22
23 /** 更新核验状态 */
24 export const verifyStatusChange = (params) => request({
25 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/verify-status-change`,
26 method: 'post',
27 data: params
28 })
29
30 /** 交付合约 */
31 export const deliveryContract = (guid) => request({
32 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/delivery?deliveryGuid=${guid}`,
33 method: 'post'
34 })
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -3,7 +3,10 @@ import TableTools from "@/components/Tools/table_tools.vue"; ...@@ -3,7 +3,10 @@ import TableTools from "@/components/Tools/table_tools.vue";
3 import { commonPageConfig, TableColumnWidth } from '@/utils/enum'; 3 import { commonPageConfig, TableColumnWidth } from '@/utils/enum';
4 import { 4 import {
5 getPageList, 5 getPageList,
6 deleteDeliveryContract 6 deleteDeliveryContract,
7 getDeliveryVerifyDetail,
8 verifyStatusChange,
9 deliveryContract
7 } from "@/api/modules/dataDelivery"; 10 } from "@/api/modules/dataDelivery";
8 11
9 const router = useRouter(); 12 const router = useRouter();
...@@ -121,6 +124,15 @@ const tableFields = ref([ ...@@ -121,6 +124,15 @@ const tableFields = ref([
121 }, click: (scope) => { 124 }, click: (scope) => {
122 //弹出查看日志框。 125 //弹出查看日志框。
123 dialogInfo.value.visible = true; 126 dialogInfo.value.visible = true;
127 execTableInfo.value.loading = true;
128 getDeliveryVerifyDetail(scope.row.guid).then((res: any) => {
129 execTableInfo.value.loading = false;
130 if (res?.code == proxy.$passCode) {
131 execTableInfo.value.data = res.data || [];
132 } else {
133 res?.msg && proxy.$ElMessage.error(res?.msg);
134 }
135 })
124 }, 136 },
125 }, 137 },
126 getName: (scope) => { 138 getName: (scope) => {
...@@ -170,7 +182,7 @@ const tableInfo = ref({ ...@@ -170,7 +182,7 @@ const tableInfo = ref({
170 rowKey: 'guid', 182 rowKey: 'guid',
171 loading: false, 183 loading: false,
172 fields: tableFields.value, 184 fields: tableFields.value,
173 data: [{verifySatus: 2}, { verifySatus: 4 }, { verifySatus: 3, deliveryStatus: 2, }], 185 data: [], //{ verifySatus: 2 }, { verifySatus: 4 }, { verifySatus: 3, deliveryStatus: 2, }
174 page: { 186 page: {
175 type: "normal", 187 type: "normal",
176 rows: 0, 188 rows: 0,
...@@ -216,14 +228,24 @@ const tableInfo = ref({ ...@@ -216,14 +228,24 @@ const tableInfo = ref({
216 if (verifySatus == 2) { 228 if (verifySatus == 2) {
217 btns.push({ 229 btns.push({
218 value: 'verify', label: '核验', click: (scope) => { 230 value: 'verify', label: '核验', click: (scope) => {
231 currTableData.value = scope.row;
219 verifyDialogInfo.value.visible = true; 232 verifyDialogInfo.value.visible = true;
233 verifyDialogInfo.value.contents[0].formInfo.items[0].default = 'TG';
234 verifyDialogInfo.value.contents[0].formInfo.items[1].default = '';
220 } 235 }
221 }); 236 });
222 } 237 }
223 //已通过且未交付时,有交付按钮 238 //已通过且未交付时,有交付按钮
224 verifySatus == 3 && deliveryStatus != 2 && btns.push({ 239 verifySatus == 3 && deliveryStatus != 2 && btns.push({
225 value: 'delivery', label: '交付', click: (scope) => { 240 value: 'delivery', label: '交付', click: (scope) => {
226 241 deliveryContract(scope.row.guid).then((res: any) => {
242 if (res?.code == proxy.$passCode) {
243 getTableData();
244 proxy.$ElMessage.success('交付提交成功');
245 } else {
246 res?.msg && proxy.$ElMessage.error(res?.msg);
247 }
248 })
227 } 249 }
228 }); 250 });
229 return btns; 251 return btns;
...@@ -256,8 +278,8 @@ const getTableData = () => { ...@@ -256,8 +278,8 @@ const getTableData = () => {
256 }).then((res: any) => { 278 }).then((res: any) => {
257 tableInfo.value.loading = false 279 tableInfo.value.loading = false
258 if (res?.code == proxy.$passCode) { 280 if (res?.code == proxy.$passCode) {
259 const data = res.data || {} 281 const data = res.data || {};
260 // tableInfo.value.data = data.records || [] 282 tableInfo.value.data = data.records || []
261 tableInfo.value.page.limit = data.pageSize 283 tableInfo.value.page.limit = data.pageSize
262 tableInfo.value.page.curr = data.pageIndex 284 tableInfo.value.page.curr = data.pageIndex
263 tableInfo.value.page.rows = data.totalRows 285 tableInfo.value.page.rows = data.totalRows
...@@ -338,7 +360,7 @@ const verifyDialogInfo = ref({ ...@@ -338,7 +360,7 @@ const verifyDialogInfo = ref({
338 { 360 {
339 type: 'radio-group', 361 type: 'radio-group',
340 label: ' ', 362 label: ' ',
341 field: 'verifySatus ', 363 field: 'verifySatus',
342 default: 'TG', 364 default: 'TG',
343 required: false, 365 required: false,
344 options: [ 366 options: [
...@@ -354,7 +376,7 @@ const verifyDialogInfo = ref({ ...@@ -354,7 +376,7 @@ const verifyDialogInfo = ref({
354 clearable: true, 376 clearable: true,
355 required: true, 377 required: true,
356 maxlength: 200, 378 maxlength: 200,
357 visible: true, 379 visible: false,
358 block: true, 380 block: true,
359 col: 'margin_b_0', 381 col: 'margin_b_0',
360 } 382 }
...@@ -370,13 +392,28 @@ const verifyDialogInfo = ref({ ...@@ -370,13 +392,28 @@ const verifyDialogInfo = ref({
370 }, 392 },
371 }); 393 });
372 394
373 const verifyDialogRadioChange = (val, row, info) => { 395 const verifyDialogRadioChange = (val, info) => {
374 396 verifyDialogInfo.value.contents[0].formInfo.items[1].visible = val == 'NTG';
375 } 397 }
376 398
377 const verifyDialogBtnClick = (btn, info) => { 399 const verifyDialogBtnClick = (btn, info) => {
378 if (btn.value == 'submit') { 400 if (btn.value == 'submit') {
379 debugger 401 if (!info.verifySuggest) {
402 proxy.$ElMessage.error('请先填写未通过理由');
403 return;
404 }
405 verifyDialogInfo.value.footer.btns[1].loading = true;
406 verifyStatusChange(Object.assign({}, info, {
407 deliveryGuid: currTableData.value.guid
408 })).then((res: any) => {
409 verifyDialogInfo.value.footer.btns[1].loading = false;
410 if (res?.code == proxy.$passCode) {
411 proxy.$ElMessage.success('核验状态提交成功');
412 getTableData();
413 } else {
414 res?.msg && proxy.$ElMessage.error(res?.msg)
415 }
416 })
380 } else if (btn.value == 'cancel') { 417 } else if (btn.value == 'cancel') {
381 verifyDialogInfo.value.visible = false; 418 verifyDialogInfo.value.visible = false;
382 } 419 }
...@@ -396,7 +433,8 @@ const verifyDialogBtnClick = (btn, info) => { ...@@ -396,7 +433,8 @@ const verifyDialogBtnClick = (btn, info) => {
396 :close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel"> 433 :close-on-click-modal="true" destroy-on-close align-center @close="handleDialogCancel">
397 <Table ref="execTableRef" :tableInfo="execTableInfo" class="exec-table" /> 434 <Table ref="execTableRef" :tableInfo="execTableInfo" class="exec-table" />
398 </el-dialog> 435 </el-dialog>
399 <Dialog :dialogInfo="verifyDialogInfo" @btnClick="verifyDialogBtnClick" @radio-group-change=verifyDialogRadioChange /> 436 <Dialog :dialogInfo="verifyDialogInfo" @btnClick="verifyDialogBtnClick"
437 @radio-group-change=verifyDialogRadioChange />
400 </div> 438 </div>
401 </template> 439 </template>
402 440
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!