往来单位 调整

szh-new
张同海 3 months ago
commit 215c80bd89

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

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

@ -65,13 +65,18 @@
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
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({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2), clientId: data.clientId })
}
@ -83,12 +88,17 @@
async function handleSave(exit) {
try {
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 })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
emit('success')
@ -103,7 +113,7 @@
}
}
}
setModalProps({ confirmLoading: false, loading: false })
exit && closeModal()
} finally {
// loading.value = false;

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

Loading…
Cancel
Save