lion 4 months ago
commit 6e9184132e

@ -1628,7 +1628,42 @@ export default {
if (fenInput) {
fenInput.value = fenTotal===0?'0':fenTotal
}
// console.log('fenTotal', wanTotal, qianTotal, baiTotal, shiTotal, yuanTotal, jiaoTotal, fenTotal)
//
if (fenTotal >= 10) {
jiaoTotal += Math.floor(fenTotal / 10);
fenTotal = fenTotal % 10;
}
if (jiaoTotal >= 10) {
yuanTotal += Math.floor(jiaoTotal / 10);
jiaoTotal = jiaoTotal % 10;
}
if (yuanTotal >= 10) {
shiTotal += Math.floor(yuanTotal / 10);
yuanTotal = yuanTotal % 10;
}
if (shiTotal >= 10) {
baiTotal += Math.floor(shiTotal / 10);
shiTotal = shiTotal % 10;
}
if (baiTotal >= 10) {
qianTotal += Math.floor(baiTotal / 10);
baiTotal = baiTotal % 10;
}
if (qianTotal >= 10) {
wanTotal += Math.floor(qianTotal / 10);
qianTotal = qianTotal % 10;
}
// input
if (wanInput) wanInput.value = wanTotal === 0 ? '0' : wanTotal;
if (qianInput) qianInput.value = qianTotal === 0 ? '0' : qianTotal;
if (baiInput) baiInput.value = baiTotal === 0 ? '0' : baiTotal;
if (shiInput) shiInput.value = shiTotal === 0 ? '0' : shiTotal;
if (yuanInput) yuanInput.value = yuanTotal === 0 ? '0' : yuanTotal;
if (jiaoInput) jiaoInput.value = jiaoTotal === 0 ? '0' : jiaoTotal;
if (fenInput) fenInput.value = fenTotal === 0 ? '0' : fenTotal;
this.otherTotal = wanTotal * 10000 + qianTotal * 1000 + baiTotal * 100 + shiTotal * 10 + yuanTotal + jiaoTotal * 0.1 + fenTotal * 0.01
this.otherTotal = this.otherTotal.toFixed(2)
// console.log('this.otherTotal', this.otherTotal)

@ -354,7 +354,7 @@ export default {
}
//
// this.calculateTotal()
this.calculateTotal()
},
caculateRoadDay() {
const sdateInput = this.$refs.printtable.querySelector('input[data-field^="sdate"]')
@ -460,6 +460,41 @@ export default {
fenInput.value = fenTotal===0?'0':fenTotal
}
//
if (fenTotal >= 10) {
jiaoTotal += Math.floor(fenTotal / 10);
fenTotal = fenTotal % 10;
}
if (jiaoTotal >= 10) {
yuanTotal += Math.floor(jiaoTotal / 10);
jiaoTotal = jiaoTotal % 10;
}
if (yuanTotal >= 10) {
shiTotal += Math.floor(yuanTotal / 10);
yuanTotal = yuanTotal % 10;
}
if (shiTotal >= 10) {
baiTotal += Math.floor(shiTotal / 10);
shiTotal = shiTotal % 10;
}
if (baiTotal >= 10) {
qianTotal += Math.floor(baiTotal / 10);
baiTotal = baiTotal % 10;
}
if (qianTotal >= 10) {
wanTotal += Math.floor(qianTotal / 10);
qianTotal = qianTotal % 10;
}
// input
if (wanInput) wanInput.value = wanTotal === 0 ? '0' : wanTotal;
if (qianInput) qianInput.value = qianTotal === 0 ? '0' : qianTotal;
if (baiInput) baiInput.value = baiTotal === 0 ? '0' : baiTotal;
if (shiInput) shiInput.value = shiTotal === 0 ? '0' : shiTotal;
if (yuanInput) yuanInput.value = yuanTotal === 0 ? '0' : yuanTotal;
if (jiaoInput) jiaoInput.value = jiaoTotal === 0 ? '0' : jiaoTotal;
if (fenInput) fenInput.value = fenTotal === 0 ? '0' : fenTotal;
let otherTotal = wanTotal * 10000 + qianTotal * 1000 + baiTotal * 100 + shiTotal * 10 + yuanTotal + jiaoTotal * 0.1 + fenTotal * 0.01
let total = 0
@ -535,6 +570,7 @@ export default {
}
span.textContent = displayText
const style = window.getComputedStyle(input)
//
span.style.cssText = style.cssText
;[
'width',
@ -553,11 +589,15 @@ export default {
].forEach(key => {
span.style[key] = style[key]
})
// widthheightInput
span.style.width = '100%'
span.style.height = style.height
span.style.whiteSpace = 'normal'
span.style.wordBreak = 'break-all'
span.style.overflowWrap = 'break-word'
span.style.display = 'block'
span.style.width = '100%'
span.style.textAlign = 'center'
span.style.verticalAlign = 'middle'
input.parentNode.replaceChild(span, input)
})
@ -566,6 +606,7 @@ export default {
const span = document.createElement('span')
span.textContent = select.options[select.selectedIndex]?.text || ''
const style = window.getComputedStyle(select)
//
span.style.cssText = style.cssText
;[
'width',
@ -584,7 +625,9 @@ export default {
].forEach(key => {
span.style[key] = style[key]
})
span.style.width = '100%'
// widthheightselect
span.style.width = style.width
span.style.height = style.height
span.style.display = 'block'
span.style.textAlign = 'center'
span.style.whiteSpace = 'pre-line' //
@ -596,6 +639,7 @@ export default {
const span = document.createElement('span')
span.textContent = textarea.value || ''
const style = window.getComputedStyle(textarea)
//
span.style.cssText = style.cssText
;[
'width',
@ -614,7 +658,9 @@ export default {
].forEach(key => {
span.style[key] = style[key]
})
span.style.width = '100%'
// widthheighttextarea
span.style.width = style.width
span.style.height = style.height
span.style.display = 'block'
span.style.textAlign = 'center'
span.style.whiteSpace = 'pre-line' //
@ -699,6 +745,7 @@ export default {
//
this.replaceControls(printNode)
console.log('printNode', printNode.innerHTML)
//
const amountInputs = printNode.querySelectorAll('input[data-field^="amount"]')
@ -756,8 +803,9 @@ export default {
padding: 0;
}
.form-container { width: 100% !important; margin: 0 auto; }
table { width: 100%; border-collapse: collapse; }
td { border: 1px solid #000; padding: 8px; }
table { width: 100%; border-collapse: collapse;table-layout: fixed; text-align: center; margin: 0 auto; }
td { border: 1px solid #000; padding: 8px; min-width: 100px; word-break: break-all; text-align: center; vertical-align: middle; }
th { text-align: center; vertical-align: middle; }
@media print {
body {
width: ${pageWidth}mm;

@ -24,23 +24,23 @@
</div>
<div class="selects">
<!-- 1. 关键字 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">关键字</span>
<span>
<Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px" />
</span>
</div>
<!-- 2. 供应商/付款对象 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">供应商/付款对象</span>
<span>
<Input v-model="select.supply" clearable placeholder="请输入供应商/付款对象" style="width: 200px" />
</span>
</div>
<!-- 3. 预算计划 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">预算计划</span>
<span>
<Input
v-model="select.plan_name"
@ -52,6 +52,7 @@
/>
</span>
</div>
<!-- 4. 签订年份 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">签订年份</span>
<span>
@ -65,126 +66,116 @@
/>
</span>
</div>
<!-- 5. 预算金额 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">创建日期</span>
<span>
<DatePicker
v-model="select.showDatePicker"
clearable
placeholder="请选择日期"
placement="bottom-start"
style="width: 200px"
type="daterange"
@on-change="datePick"
/>
</span>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
项目类型
</span>
<Select v-model="select.type" clearable placeholder="请选择项目类型" style="width:140px;">
<Option v-for="item in type" :key="item.value" :value="item.value">{{ item.label }}</Option>
</Select>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
业务科室
</span>
<el-select
v-model="select.department_id"
clearable
placeholder="业务科室选择"
size="small"
style="width: 120px;"
>
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
采购形式
</span>
<Select v-model="select.purchase_type_id" clearable placeholder="请选择采购形式" style="width:140px;">
<Option v-for="item in purchaseType" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
采购方式
</span>
<Select v-model="select.purchase_way_id" clearable placeholder="请选择采购方式" style="width:200px;">
<Option v-for="item in purchaseWay" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
预算金额
</span>
<span style="padding: 0 6px;word-break: keep-all;">预算金额</span>
<el-input-number v-model="select.start_plan_price" size="small" :controls="false" :min="0" placeholder="最小金额" style="width: 100px;" />
<span style="padding: 0 5px;">-</span>
<el-input-number v-model="select.end_plan_price" size="small" :controls="false" :min="0" placeholder="最大金额" style="width: 100px;" />
</div>
<!-- 更多按钮 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">
合同状态
</span>
<Select v-model="select.status" clearable placeholder="请选择" style="width:100px;">
<Option
v-for="item in [{label:'待签订',value:1},{label:'已签订',value:2}]"
:key="item.value"
:value="item.value"
>{{ item.label }}
</Option>
</Select>
<Button type="text" @click="showMoreSearch = !showMoreSearch">
{{ showMoreSearch ? '收起' : '更多' }}
</Button>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
招标流程状态
</span>
<Select v-model="select.invite_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
采购流程状态
</span>
<Select v-model="select.purchase_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
合同会签状态
</span>
<Select v-model="select.join_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">
请示流程状态
</span>
<Select v-model="select.req_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<!-- 其余搜索项v-if="showMoreSearch" -->
<template v-if="showMoreSearch">
<!-- 项目类型 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">项目类型</span>
<Select v-model="select.type" clearable placeholder="请选择项目类型" style="width:140px;">
<Option v-for="item in type" :key="item.value" :value="item.value">{{ item.label }}</Option>
</Select>
</div>
<!-- 业务科室 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">业务科室</span>
<el-select
v-model="select.department_id"
clearable
placeholder="业务科室选择"
size="small"
style="width: 120px;"
>
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</div>
<!-- 采购形式 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">采购形式</span>
<Select v-model="select.purchase_type_id" clearable placeholder="请选择采购形式" style="width:140px;">
<Option v-for="item in purchaseType" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
</div>
<!-- 采购方式 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">采购方式</span>
<Select v-model="select.purchase_way_id" clearable placeholder="请选择采购方式" style="width:200px;">
<Option v-for="item in purchaseWay" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
</div>
<!-- 合同状态 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">合同状态</span>
<Select v-model="select.status" clearable placeholder="请选择" style="width:100px;">
<Option
v-for="item in [{label:'待签订',value:1},{label:'已签订',value:2}]"
:key="item.value"
:value="item.value"
>{{ item.label }}
</Option>
</Select>
</div>
<!-- 招标流程状态 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">招标流程状态</span>
<Select v-model="select.invite_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<!-- 采购流程状态 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">采购流程状态</span>
<Select v-model="select.purchase_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<!-- 合同会签状态 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">合同会签状态</span>
<Select v-model="select.join_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<!-- 请示流程状态 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">请示流程状态</span>
<Select v-model="select.req_status" clearable placeholder="请选择" style="width:100px;">
<Option v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}
</Option>
</Select>
</div>
<!-- 创建日期 -->
<div>
<span style="padding: 0 6px;word-break: keep-all;">创建日期</span>
<span>
<DatePicker
v-model="select.showDatePicker"
clearable
placeholder="请选择日期"
placement="bottom-start"
style="width: 200px"
type="daterange"
@on-change="datePick"
/>
</span>
</div>
</template>
<!-- 查询重置导出按钮始终显示 -->
<Button style="margin-left: 10px" type="primary" @click="getContracts"></Button>
<Button
ghost
@ -195,7 +186,6 @@
重置
</Button>
<Button type="primary" style="margin-left: 10px" @click="downloadExel()"></Button>
<!-- <Button type="primary" style="margin-left: 10px">导出</Button>-->
</div>
</slot>
</lx-header>
@ -1018,6 +1008,7 @@ export default {
end_plan_price: undefined
},
showMoreSearch: false,
type: [{
label: '服务',
value: 1
@ -1580,7 +1571,7 @@ export default {
})
this.getPurchaseType()
this.getContracts()
this.getDepartment()
this.getDepartment(-1)
this.getPurchaseWay()
this.getMoneyWay()
@ -1981,8 +1972,12 @@ export default {
this.getBudgets()
},
//
async getDepartment() {
this.departments = await listdeptNoAuth()
async getDepartment(status) {
const params = { show_tree: 1,sort_name:'sortnumber',sort_type:'asc' }
if (status !== undefined) {
params.status = status
}
this.departments = await listdeptNoAuth(params)
},
//
async getPurchaseType() {
@ -3476,9 +3471,11 @@ export default {
//
async handleAddContractByCategory(type) {
this.formType = type
this.loading = true
try {
// 1. id
this.loading = true
try {
// 0.
await this.getDepartment()
// 1. id
const userDeptId = this.$store.state.user.info.department_id
// 2.
this.isShowAdd = true

Loading…
Cancel
Save