sunzehua 3 months ago
commit ee7ca881f5

@ -238,7 +238,10 @@ export function formatParams(params = {}, equal: any = [], otherQuery: any = [])
} else { } else {
postData.pageCondition.sortConditions = [] postData.pageCondition.sortConditions = []
} }
if (otherQuery.length) {
postData.otherQueryCondition = otherQueryCondition postData.otherQueryCondition = otherQueryCondition
}
postData.queryCondition = JSON.stringify(conditions) postData.queryCondition = JSON.stringify(conditions)
return postData return postData
} }

@ -142,78 +142,70 @@ export const formSchema: FormSchema[] = [
label: '代码', label: '代码',
required: true, required: true,
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 8 },
}, },
{ {
field: 'shortName', field: 'shortName',
label: '简称', label: '简称',
required: true, required: true,
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 8 },
},
{
field: 'companyNo',
label: '公司代码',
component: 'Input',
colProps: { span: 8 },
defaultValue: 0,
},
{
field: 'shortDetail',
label: '详细信息',
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
rows: 3,
},
}, },
{ {
field: 'name', field: 'name',
label: '公司全称', label: '公司全称',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 8 },
}, },
{ {
field: 'address', field: 'address',
label: '地址', label: '地址',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 16 },
},
{
field: 'shipperType',
label: '类型',
required: true,
component: 'Select',
colProps: { span: 12 },
componentProps: {
options: shipperTypeList,
allowClear: true,
showSearch: true,
mode: 'multiple',
class: 'NoLimitHeight',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
}, },
{ {
field: 'attn', field: 'attn',
label: '联系人', label: '联系人',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
}, },
{ {
field: 'email', field: 'email',
label: '邮箱', label: '邮箱',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
}, },
{ {
field: 'tel', field: 'tel',
label: '电话', label: '电话',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 8 },
defaultValue: '', defaultValue: '',
}, },
{
field: 'companyNo',
label: '公司代码',
component: 'Input',
colProps: { span: 12 },
defaultValue: 0,
},
{ {
field: 'isPublic', field: 'isPublic',
label: '是否公共标识', label: '是否公共标识',
component: 'Switch', component: 'Switch',
defaultValue: false, defaultValue: false,
colProps: { span: 6 }, colProps: { span: 8 },
componentProps: { componentProps: {
checkedChildren: '是', checkedChildren: '是',
unCheckedChildren: '否', unCheckedChildren: '否',
@ -224,7 +216,7 @@ export const formSchema: FormSchema[] = [
label: '是否可用', label: '是否可用',
component: 'Switch', component: 'Switch',
defaultValue: 0, defaultValue: 0,
colProps: { span: 6 }, colProps: { span: 8 },
componentProps: { componentProps: {
checkedChildren: '是', checkedChildren: '是',
checkedValue: 0, checkedValue: 0,
@ -233,17 +225,25 @@ export const formSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'note', field: 'shipperType',
label: '备注', label: '类型',
component: 'InputTextArea', required: true,
component: 'Select',
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {
rows: 2, options: shipperTypeList,
allowClear: true,
showSearch: true,
mode: 'multiple',
class: 'NoLimitHeight',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}, },
}, },
{ {
field: 'shortDetail', field: 'note',
label: '详细信息', label: '备注',
component: 'InputTextArea', component: 'InputTextArea',
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {

@ -8,10 +8,17 @@
<h4 v-if="logList.length"></h4> <h4 v-if="logList.length"></h4>
<a-timeline style="margin-left: 89px; margin-top: 20px;"> <a-timeline style="margin-left: 89px; margin-top: 20px;">
<a-timeline-item v-for="item in logList" :key="item.id"> <a-timeline-item v-for="item in logList" :key="item.id">
<div style="position: relative;"> <div class="log-info" style="position: relative;">
<div class="ds-journal-timer">{{ item.createTime }}</div> <div class="ds-journal-timer">{{ item.createTime }}</div>
<div>{{ item.createUserName }}</div> <div>{{ item.createUserName }}</div>
<div><span style="color: #7A8798;">操作了 </span><span style="color: #257AFA;">{{ item.sourceName }}</span></div> <div><span style="color: #7A8798;">操作了 </span><span @click="foldLog(item)" style="color: #257AFA; cursor: pointer;">{{ item.sourceName }} <span v-if="item.details && item.details.length" class="iconfont icon-unfold" :class="{ 'r-270': item.flag }"></span></span></div>
<div v-if="item.flag">
<div class="log-item" v-for="c in item.details" :key="c.id">
<div class="old-v">{{ c.fieldValue }}{{ c.oldValue || '空值' }}</div>
<div class="old-v">改为</div>
<div class="new-v">{{ c.newValue || '空值' }}</div>
</div>
</div>
</div> </div>
</a-timeline-item> </a-timeline-item>
</a-timeline> </a-timeline>
@ -51,26 +58,35 @@
const init = () => { const init = () => {
const data = props.data const data = props.data
data.forEach(item => { data.forEach(item => {
if (item.createTime) item.createTime = item.createTime.split(' ')[0] item['flag'] = false
}) })
logList.value = data logList.value = data
} }
//
const foldLog = (item) => {
item.flag = !item.flag
}
onMounted(() => { onMounted(() => {
init() init()
}) })
</script> </script>
<style scoped> <style lang="less" scoped>
:deep(.ant-timeline-item-tail) {
left: -4px;
}
:deep(.ant-timeline-item-head) {
left: -8px;
}
.ds-journal-timer { .ds-journal-timer {
position: absolute; position: absolute;
left: -115px; left: -115px;
width: 78px; width: 78px;
height: 20px; height: 20px;
border-radius: 2px; border-radius: 2px;
background: #F5F9FC; color: #7A8798;
color: #257AFA;
line-height: 20px; line-height: 20px;
text-align: center; text-align: left;
} }
.info-header { .info-header {
background: #F5F9FC; background: #F5F9FC;
@ -81,4 +97,28 @@
font-size: 12px; font-size: 12px;
padding: 10px 10px 0; padding: 10px 10px 0;
} }
.icon-unfold {
font-size: 10px;
color: #257AFA;
transform: rotate(90deg);
display: inline-block;
transform-origin: center;
}
.r-270 {
transform: rotate(270deg);
}
.log-info {
font-size: 12px;
.log-item {
margin: 5px 0;
padding-bottom: 5px;
border-bottom: 1px solid #E8EBED;
.old-v {
color: #7A8798;
}
.new-v {
color: #FF8D1A;
}
}
}
</style> </style>

@ -136,7 +136,7 @@
type="link" type="link"
v-repeat v-repeat
size="mini" size="mini"
:disabled="RSaveType().length" :disabled="!!RSaveType().length"
@click="saveChildData" @click="saveChildData"
> >
<span class="iconfont icon-baocun"></span> <span class="iconfont icon-baocun"></span>

@ -652,7 +652,7 @@
} }
} }
// //
function saveService(data) { function saveService(data, flag) {
if (!props.id) { if (!props.id) {
createMessage.warning('请先保存主单') createMessage.warning('请先保存主单')
return false return false
@ -662,12 +662,23 @@
projectCodes: [data.projectCode], projectCodes: [data.projectCode],
opertType: 0, opertType: 0,
} }
if (flag) obj.projectCodes = data.projectCode
if (!data.isYield) { if (!data.isYield) {
if (flag) {
bookingServiceItem.value.forEach((item) => {
data.projectCode.forEach(o => {
if (item.projectCode == o) {
item.isYield = !item.isYield
}
})
})
} else {
bookingServiceItem.value.forEach((item) => { bookingServiceItem.value.forEach((item) => {
if (item.projectCode == data.projectCode) { if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield item.isYield = !item.isYield
} }
}) })
}
seriveLoading.value = true seriveLoading.value = true
SaveServiceProject(obj).then((res) => { SaveServiceProject(obj).then((res) => {
seriveLoading.value = false seriveLoading.value = false
@ -686,12 +697,18 @@
}).catch(() => { }).catch(() => {
seriveLoading.value = false seriveLoading.value = false
}) })
} else {
if (flag) {
bookingServiceItem.value.forEach((item) => {
item.isYield = false
})
} else { } else {
bookingServiceItem.value.forEach((item) => { bookingServiceItem.value.forEach((item) => {
if (item.projectCode == data.projectCode) { if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield item.isYield = !item.isYield
} }
}) })
}
seriveLoading.value = true seriveLoading.value = true
CancelServiceProject(obj).then((res) => { CancelServiceProject(obj).then((res) => {
seriveLoading.value = false seriveLoading.value = false
@ -1000,8 +1017,22 @@
}) })
} }
onMounted(() => { onMounted(() => {
emitter.on('customerBack', (v) => { emitter.on('customerBack', async (v) => {
// if (v.serviceItem) // ()
const pitem = bookingServiceItem.value.filter(item => {
return item.isYield
})
if (pitem.length == 0 && !v.serviceItem) return
const pcode = pitem.map(row => {
return row.projectCode
})
await saveService({ isYield: true, projectCode: pcode }, true)
if (v.serviceItem) {
const projectCode = v.serviceItem.split(',')
saveService({ isYield: false, projectCode }, true)
}
// saveService({ isYield: false, projectCode: [] })
// console.log(v.serviceItem)
}) })
emitter.on('seaAddNotes', (v) => { emitter.on('seaAddNotes', (v) => {
if (!props.id) return if (!props.id) return

Loading…
Cancel
Save