往来单位 调整

szh-new
张同海 3 months ago
parent 450a361418
commit 1890a4ee83

@ -50,12 +50,12 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, width: 150,
}, },
{ // {
title: '箱型箱量', // title: '箱型箱量',
dataIndex: 'ctntotal', // dataIndex: 'ctntotal',
sorter: true, // sorter: true,
width: 200, // width: 200,
}, // },
{ {
title: '已提箱', title: '已提箱',
dataIndex: 'pickupCtntotal', dataIndex: 'pickupCtntotal',

@ -49,7 +49,13 @@
<img src="../../../assets/svg/infoclient/shangxia.svg" class="SvgImg" /> <img src="../../../assets/svg/infoclient/shangxia.svg" class="SvgImg" />
</span> </span>
</a-tooltip> </a-tooltip>
<!-- <span>{{ getFieldsValue().auditStatusText }}</span> --> <Divider type="vertical" />
<span class="auditStatusText" :class="RauditClass()">
<span class="iconfont icon-yiwancheng2" v-if="auditStatusText == '审核通过'"></span>
<span class="iconfont icon-weiwancheng" v-if="auditStatusText == '驳回'"></span>
<span class="iconfont icon-time" v-if="auditStatusText == '待审批'"></span>
<span>{{ auditStatusText }}</span>
</span>
</div> </div>
<div class="ds-detail-box sea-export-detail"> <div class="ds-detail-box sea-export-detail">
<div :style="{ display: 'flex' }"> <div :style="{ display: 'flex' }">
@ -188,6 +194,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, unref, watch, onMounted, watchEffect } from 'vue' import { ref, computed, unref, watch, onMounted, watchEffect } from 'vue'
import { Divider } from 'ant-design-vue'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema, formSchema2, Tablecolumns } from './columns' import { formSchema, formSchema2, Tablecolumns } from './columns'
@ -283,7 +290,20 @@
schemas: formSchema, schemas: formSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
function RauditClass() {
let RData = ''
switch (auditStatusText.value) {
case '审核通过':
RData = 'active'
break
case '驳回':
RData = 'rejected'
break
default:
break
}
return RData
}
const linkageForm = (e) => { const linkageForm = (e) => {
formSchema.forEach((item) => { formSchema.forEach((item) => {
if (item.field == e.schema.field) { if (item.field == e.schema.field) {
@ -412,6 +432,8 @@
note: '', note: '',
createTime: '', createTime: '',
}) })
const auditStatusText = ref('')
async function getData(type) { async function getData(type) {
list.value.splice(0) list.value.splice(0)
const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) }) const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) })
@ -439,6 +461,7 @@
await setFieldsValue({ await setFieldsValue({
...res.data, ...res.data,
}) })
auditStatusText.value = res.data.auditStatusText
let Arr: any = [] let Arr: any = []
await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => { await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => {
res.data.forEach((item) => { res.data.forEach((item) => {
@ -549,6 +572,7 @@
rowId.value = '' rowId.value = ''
activeKey.value = '2' activeKey.value = '2'
await setFieldsValue({}) await setFieldsValue({})
auditStatusText.value = ''
activeKey.value = '1' activeKey.value = '1'
await setFieldsValue1({}) await setFieldsValue1({})
} }
@ -689,6 +713,7 @@
...getFieldsValue(), ...getFieldsValue(),
id: res.data, id: res.data,
}) })
auditStatusText.value = getFieldsValue().auditStatusText
} }
getData(false) getData(false)
notification.success({ message: res.message, duration: 3 }) notification.success({ message: res.message, duration: 3 })
@ -714,6 +739,8 @@
async function SubmitAudit() { async function SubmitAudit() {
if (rowId.value) { if (rowId.value) {
const auditStatus = getFieldsValue().auditStatus const auditStatus = getFieldsValue().auditStatus
console.log(getFieldsValue())
if (auditStatus == -1 || auditStatus == 2) { if (auditStatus == -1 || auditStatus == 2) {
let ApiData: any = { ids: [rowId.value] } let ApiData: any = { ids: [rowId.value] }
let res = await ApiSubmitAudit(ApiData) let res = await ApiSubmitAudit(ApiData)
@ -753,6 +780,7 @@
await setFieldsValue({ await setFieldsValue({
...res.data, ...res.data,
}) })
auditStatusText.value = res.data.auditStatusText
} }
} }
// --------------------------------------------------- // ---------------------------------------------------
@ -889,6 +917,17 @@
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.auditStatusText {
color: #333333;
&.active {
color: #17a6a3;
}
&.rejected {
color: red;
}
line-height: 14px;
margin-left: 8px;
}
.infoclientBox { .infoclientBox {
display: flex; display: flex;
background: rgba(245, 249, 252, 1); background: rgba(245, 249, 252, 1);

@ -474,6 +474,20 @@ export const formSchema: FormSchema[] = [
defaultValue: '', defaultValue: '',
show: false, show: false,
}, },
{
label: '审批状态',
field: 'auditStatus',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '审批状态名称',
field: 'auditStatusText',
component: 'Input',
defaultValue: '',
show: false,
},
{ {
field: 'description', field: 'description',
label: '客户全称', label: '客户全称',

@ -65,13 +65,18 @@
rowId.value = data.record.id rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) { if (res.succeeded) {
console.log(res.data)
let RshipperType = []
res.data.shipperType.split(',').forEach((e) => {
RshipperType.push(parseInt(e))
})
res.data.shipperType = RshipperType
console.log(res.data)
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
} }
// setModalProps({ confirmLoading: false });
} else { } else {
setFieldsValue({ permissionIdentity: unref(2), clientId: data.clientId }) setFieldsValue({ permissionIdentity: unref(2), clientId: data.clientId })
} }
@ -83,12 +88,17 @@
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() const values = await validate()
let shipperTypeS = ''
values.shipperType.forEach((item) => {
if (shipperTypeS == '') {
shipperTypeS = item
} else {
shipperTypeS = `${shipperTypeS},${item}`
}
})
values.shipperType = shipperTypeS
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values) const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) { if (res.succeeded) {
notification.success({ message: res.message, duration: 3 }) notification.success({ message: res.message, duration: 3 })
emit('success') emit('success')
@ -103,7 +113,7 @@
} }
} }
} }
setModalProps({ confirmLoading: false, loading: false })
exit && closeModal() exit && closeModal()
} finally { } finally {
// loading.value = false; // loading.value = false;

@ -5,7 +5,7 @@ let shipperTypeList: any = []
const res2: API.DataResult = await getDictDropDown({ code: 'shipper_type' }) const res2: API.DataResult = await getDictDropDown({ code: 'shipper_type' })
if (res2.succeeded) { if (res2.succeeded) {
shipperTypeList = [] shipperTypeList = []
console.log(res2.data)
res2.data.forEach((e) => { res2.data.forEach((e) => {
shipperTypeList.push({ label: e.name, value: Number(e.value) }) shipperTypeList.push({ label: e.name, value: Number(e.value) })
}) })
@ -28,22 +28,32 @@ export const columns: BasicColumn[] = [
customRender: ({ text }) => { customRender: ({ text }) => {
let RData = '' let RData = ''
// else 在后端更改 参数类型后 删除 // else 在后端更改 参数类型后 删除
if (text.length) { // if (text.length) {
text.forEach((e) => { // text.forEach((e) => {
shipperTypeList.forEach((item) => { // shipperTypeList.forEach((item) => {
if (item.value == e) { // if (item.value == e) {
RData = RData == '' ? item.label : `${RData},${item.label}` // RData = RData == '' ? item.label : `${RData},${item.label}`
} // }
}) // })
}) // })
} else { // } else {
// shipperTypeList.forEach((e: any) => {
// if (text == e.value) {
// RData = e.label
// }
// })
// }
text.split(',').forEach((item) => {
shipperTypeList.forEach((e: any) => { shipperTypeList.forEach((e: any) => {
if (text == e.value) { if (item == e.value) {
RData = e.label if (RData == '') {
RData = e.label
} else {
RData = `${RData} ${e.label}`
}
} }
}) })
} })
return RData return RData
}, },
}, },

Loading…
Cancel
Save