sunzehua 3 months ago
commit ee7ca881f5

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

@ -142,78 +142,70 @@ export const formSchema: FormSchema[] = [
label: '代码',
required: true,
component: 'Input',
colProps: { span: 12 },
colProps: { span: 8 },
},
{
field: 'shortName',
label: '简称',
required: true,
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',
label: '公司全称',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 8 },
},
{
field: 'address',
label: '地址',
component: 'Input',
colProps: { span: 12 },
},
{
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
},
},
colProps: { span: 16 },
},
{
field: 'attn',
label: '联系人',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 8 },
defaultValue: '',
},
{
field: 'email',
label: '邮箱',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 8 },
defaultValue: '',
},
{
field: 'tel',
label: '电话',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 8 },
defaultValue: '',
},
{
field: 'companyNo',
label: '公司代码',
component: 'Input',
colProps: { span: 12 },
defaultValue: 0,
},
{
field: 'isPublic',
label: '是否公共标识',
component: 'Switch',
defaultValue: false,
colProps: { span: 6 },
colProps: { span: 8 },
componentProps: {
checkedChildren: '是',
unCheckedChildren: '否',
@ -224,7 +216,7 @@ export const formSchema: FormSchema[] = [
label: '是否可用',
component: 'Switch',
defaultValue: 0,
colProps: { span: 6 },
colProps: { span: 8 },
componentProps: {
checkedChildren: '是',
checkedValue: 0,
@ -233,17 +225,25 @@ export const formSchema: FormSchema[] = [
},
},
{
field: 'note',
label: '备注',
component: 'InputTextArea',
field: 'shipperType',
label: '类型',
required: true,
component: 'Select',
colProps: { span: 12 },
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',
label: '详细信息',
field: 'note',
label: '备注',
component: 'InputTextArea',
colProps: { span: 12 },
componentProps: {

@ -8,10 +8,17 @@
<h4 v-if="logList.length"></h4>
<a-timeline style="margin-left: 89px; margin-top: 20px;">
<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>{{ 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>
</a-timeline-item>
</a-timeline>
@ -51,26 +58,35 @@
const init = () => {
const data = props.data
data.forEach(item => {
if (item.createTime) item.createTime = item.createTime.split(' ')[0]
item['flag'] = false
})
logList.value = data
}
//
const foldLog = (item) => {
item.flag = !item.flag
}
onMounted(() => {
init()
})
</script>
<style scoped>
<style lang="less" scoped>
:deep(.ant-timeline-item-tail) {
left: -4px;
}
:deep(.ant-timeline-item-head) {
left: -8px;
}
.ds-journal-timer {
position: absolute;
left: -115px;
width: 78px;
height: 20px;
border-radius: 2px;
background: #F5F9FC;
color: #257AFA;
color: #7A8798;
line-height: 20px;
text-align: center;
text-align: left;
}
.info-header {
background: #F5F9FC;
@ -81,4 +97,28 @@
font-size: 12px;
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>

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

@ -652,7 +652,7 @@
}
}
//
function saveService(data) {
function saveService(data, flag) {
if (!props.id) {
createMessage.warning('请先保存主单')
return false
@ -662,12 +662,23 @@
projectCodes: [data.projectCode],
opertType: 0,
}
if (flag) obj.projectCodes = data.projectCode
if (!data.isYield) {
bookingServiceItem.value.forEach((item) => {
if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield
}
})
if (flag) {
bookingServiceItem.value.forEach((item) => {
data.projectCode.forEach(o => {
if (item.projectCode == o) {
item.isYield = !item.isYield
}
})
})
} else {
bookingServiceItem.value.forEach((item) => {
if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield
}
})
}
seriveLoading.value = true
SaveServiceProject(obj).then((res) => {
seriveLoading.value = false
@ -687,11 +698,17 @@
seriveLoading.value = false
})
} else {
bookingServiceItem.value.forEach((item) => {
if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield
}
})
if (flag) {
bookingServiceItem.value.forEach((item) => {
item.isYield = false
})
} else {
bookingServiceItem.value.forEach((item) => {
if (item.projectCode == data.projectCode) {
item.isYield = !item.isYield
}
})
}
seriveLoading.value = true
CancelServiceProject(obj).then((res) => {
seriveLoading.value = false
@ -1000,8 +1017,22 @@
})
}
onMounted(() => {
emitter.on('customerBack', (v) => {
// if (v.serviceItem)
emitter.on('customerBack', async (v) => {
// ()
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) => {
if (!props.id) return

Loading…
Cancel
Save