Merge branch 'zth' into dev

szh-new
张同海 2 months ago
commit a919c83ed7

@ -46,6 +46,20 @@
return []
},
},
checkedChildren: { type: String },
checkedValue: {
type: Boolean,
default: () => {
return true
},
},
unCheckedChildren: { type: String },
unCheckedValue: {
type: Boolean,
default: () => {
return false
},
},
formModel: { type: Object },
},
emits: ['change', 'update:value', 'edit'],
@ -59,7 +73,7 @@
}
function GetState() {
let RData: any = null
if (state.value) {
if (state.value || state.value === false) {
if (props.treeData.length) {
let FnFor = (Data) => {
Data.forEach((item: any) => {
@ -86,6 +100,12 @@
})
} else if (state.value.$d && state.value.$isDayjsObject) {
RData = dayjs(state.value.$d).format('YYYY-MM-DD')
} else if (props.checkedChildren) {
if (state.value == props.checkedValue) {
RData = props.checkedChildren
} else if (state.value == props.unCheckedValue) {
RData = props.unCheckedChildren
}
} else {
if (props.label == '来源明细') {
appStore.getSourceData.forEach((item) => {

@ -8,7 +8,6 @@ export function GetCheckBillList(parameter) {
data: parameter,
})
}
// 客户对账编辑 (Auth) #
export function EditCheckBill(parameter) {
return request({

@ -48,31 +48,33 @@ export const schemas: FormSchema[] = [
colProps: { span: 4 },
},
{
field: 'customerName',
field: 'customerId',
component: 'Input',
label: '对账客户Name',
label: '对账客户',
colProps: { span: 4 },
show: false,
},
{
field: 'customerId',
component: 'ApiSelect',
label: '对账客户',
field: 'customerName',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
componentProps: (a) => {
return {
allowClear: true,
showSearch: true,
api: GetAllClientList,
labelField: 'shortName',
valueField: 'id',
valueField: 'shortName',
resultField: 'data',
immediate: true,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.customerName = obj.label
console.log(obj)
a.formModel.customerId = obj.id
}
},
}
@ -97,6 +99,12 @@ export const schemas: FormSchema[] = [
label: '是否不含税',
defaultValue: false,
colProps: { span: 2 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
},
// isLocking
// { field: 'billName', component: 'Input', label: '对账单名称', colProps: { span: 4 } },
@ -171,9 +179,9 @@ export const Editschemas: FormSchema[] = [
},
},
{
field: 'customerName',
field: 'customerId',
component: 'DEdit',
label: '对账客户Name',
label: '对账客户',
colProps: { span: 4 },
show: false,
componentProps: (e) => {
@ -186,29 +194,30 @@ export const Editschemas: FormSchema[] = [
},
},
{
field: 'customerId',
component: 'DEdit',
label: '对账客户',
field: 'customerName',
component: 'DEdit',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
componentProps: (a) => {
return {
allowClear: true,
showSearch: true,
api: GetAllClientList,
labelField: 'shortName',
valueField: 'id',
valueField: 'shortName',
resultField: 'data',
immediate: true,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.customerName = obj.label
a.formModel.customerId = obj.id
}
},
onEdit: () => {
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null
const { formActionType } = a
formActionType ? formActionType.linkageForm(a) : null
},
}
},
@ -221,6 +230,10 @@ export const Editschemas: FormSchema[] = [
colProps: { span: 2 },
componentProps: (e) => {
return {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
onEdit: () => {
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null

@ -93,7 +93,7 @@
</a-select>
</span> -->
</div>
<div class="CsbillNo"> 对账编号{{ billNo }} </div>
<div class="CsbillNo" v-if="billNo"> {{ billNo }} </div>
</div>
<div class="CsMain p-4" id="detail">
<ActionBar
@ -145,12 +145,17 @@
</template>
</BasicTable>
<div class="totalBox">
<span class="Ttitle">合计</span>
<div class="unitBox">
<div v-for="item in calcColumns" :key="item.dataIndex" class="unit">
<!-- <div v-for="item in calcColumns" :key="item.dataIndex" class="unit">
<span class="title">{{ item.title }}:</span>
<span class="num">{{ Ldata[item.dataIndex] }}</span>
</div>
</div> -->
<a-table
class="ds-table"
:columns="calcColumns"
:data-source="[Ldata]"
:pagination="false"
></a-table>
</div>
</div>
</a-spin>
@ -254,6 +259,7 @@
const spinningT = ref(false)
const billNo = ref()
const isLocking = ref(false)
const calcData = ref([])
init()
// -------------------------------------
const RefActionBar = ref()
@ -309,7 +315,7 @@
//
const [registerForm, { getFieldsValue, setFieldsValue, updateSchema }] = useForm({
labelWidth: 120,
schemas: id.value ? schemas : Editschemas,
schemas: id.value ? Editschemas : schemas,
showActionButtonGroup: false,
actionColOptions: {
span: 5,
@ -720,7 +726,7 @@
.CsHeader {
padding-bottom: 0 !important;
margin: 0 0 10px 0 !important;
border: 1px solid #e8ebed;
// border: 1px solid #e8ebed;
.headerForm {
background: #fff;
padding: 5px 15px 10px 15px !important;

Loading…
Cancel
Save