# Conflicts:
#	jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseInBoundNotice/form.vue
jg-waiwang-pro
vayne 7 months ago
commit 8e99e63969

@ -12,6 +12,9 @@ import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.entity.ProvinceAtlasEntity;
import jnpf.base.service.ProvinceAtlasService;
import jnpf.base.service.ProvinceService;
import jnpf.base.util.OptimizeUtil;
import jnpf.constant.MsgCode;
import jnpf.exception.DataException;
@ -26,6 +29,7 @@ import jnpf.util.*;
import jnpf.model.voucher.*;
import jnpf.utils.YozoUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.util.Base64Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
@ -106,6 +110,8 @@ public class VoucherController {
private SubjectbasicService subjectbasicService;
@Autowired
private OrganizeService organizeService;
@Autowired
private ProvinceService provinceService;
/**
*
@ -119,7 +125,15 @@ public class VoucherController {
List<VoucherEntity> list= voucherService.getList(voucherPagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (VoucherEntity entity : list) {
Map<String, Object> voucherMap=JsonUtil.entityToMap(entity);
List<String> placeDispatchArr = JSON.parseArray(entity.getPlaceDispatch(), String.class);
List<String> destinationArr = JSON.parseArray(entity.getPlaceDispatch(), String.class);
List<ProvinceEntity> placeDispatchList = provinceService.getProList(placeDispatchArr);
List<ProvinceEntity> destinationList = provinceService.getProList(destinationArr);
List<String> placeDispatchs = placeDispatchList.stream().map(ProvinceEntity::getFullName).collect(Collectors.toList());
List<String> destinations = destinationList.stream().map(ProvinceEntity::getFullName).collect(Collectors.toList());
entity.setPlaceDispatch(placeDispatchs.stream().collect(Collectors.joining(",")));
entity.setDestination(destinations.stream().collect(Collectors.joining(",")));
Map<String, Object> voucherMap=JsonUtil.entityToMap(entity);
voucherMap.put("id", voucherMap.get("id"));
//副表数据
//子表数据
@ -130,7 +144,7 @@ public class VoucherController {
realList.add(voucherMap);
}
//数据转换
// realList = generaterSwapUtil.swapDataList(realList, VoucherConstant.getFormData(), VoucherConstant.getColumnData(), voucherPagination.getModuleId(),false);
//realList = generaterSwapUtil.swapDataList(realList, VoucherConstant.getFormData(), VoucherConstant.getColumnData(), voucherPagination.getModuleId(),false);
//流程状态添加
for(Map<String, Object> vo:realList){

@ -21,10 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**

@ -0,0 +1,366 @@
<template>
<div class="popupSelect-container">
<div class="el-select" @click="openDialog">
<el-input :placeholder="placeholder" v-model="innerValue" readonly :validate-event="false"
@mouseenter.native="inputHovering = true" @mouseleave.native="inputHovering = false">
<template slot="suffix">
<i v-show="!showClose" :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up']"></i>
<i v-if="showClose" class="el-select__caret el-input__icon el-icon-circle-close" @click="clear"></i>
</template>
</el-input>
</div>
<template v-if="popupType === 'dialog'">
<el-dialog :title="popupTitle" :close-on-click-modal="false" :visible.sync="visible" v-if="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body :width='popupWidth'>
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="listQuery.keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()"
class="search-input" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()">
{{ $t('common.search') }}
</el-button>
<el-button icon="el-icon-refresh-right" @click="reset()">{{ $t('common.reset') }}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" :border="false" highlight-current-row @row-click="rowClick"
:hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row[propsValue]" v-model="checked">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column :prop="item.value" :label="item.label" v-for="(item, i) in columnOptions" :key="i" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" v-if="hasPage" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false" size="small">{{ $t('common.cancelButton') }}</el-button>
<el-button type="primary" @click="select()" size="small">{{ $t('common.confirmButton') }}
</el-button>
</span>
</el-dialog>
</template>
<template v-if="popupType === 'drawer'">
<el-drawer :title="popupTitle" :visible.sync="visible" :wrapperClosable="false" ref="drawer" :size='popupWidth'
append-to-body class="JNPF-common-drawer">
<div class="JNPF-flex-main">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="listQuery.keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()"
class="search-input" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()">
{{ $t('common.search') }}
</el-button>
<el-button icon="el-icon-refresh-right" @click="reset()">{{ $t('common.reset') }}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" :border="false" highlight-current-row @row-click="rowClick"
:hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row[propsValue]" v-model="checked">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column :prop="item.value" :label="item.label" v-for="(item, i) in columnOptions" :key="i" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" v-if="hasPage" />
<div class="drawer-footer">
<el-button @click="visible = false" size="small">{{ $t('common.cancelButton') }}
</el-button>
<el-button type="primary" @click="select()" size="small">{{ $t('common.confirmButton') }}
</el-button>
</div>
</div>
</el-drawer>
</template>
</div>
</template>
<script>
import { getDataInterfaceDataSelect, getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface'
import emitter from 'element-ui/src/mixins/emitter'
let { methods: { dispatch } } = emitter
export default {
name: 'JnpfPopupSelectCus',
props: {
value: {
default: ''
},
filterVal: {
type: String,
default: ''
},
rowIndex: {
default: null
},
formData: {
type: Object
},
templateJson: {
type: Array,
default: () => []
},
interfaceId: {
type: String,
default: ''
},
placeholder: {
type: String,
default: '请选择'
},
propsValue: {
type: String,
default: 'id'
},
relationField: {
type: String,
default: 'fullName'
},
popupType: {
type: String,
default: 'dialog'
},
popupTitle: {
type: String,
default: '选择数据'
},
popupWidth: {
type: String,
default: '800px'
},
field: {
type: String,
default: ''
},
columnOptions: {
type: Array,
default: () => []
},
hasPage: {
type: Boolean,
default: false
},
pageSize: {
type: Number,
default: 20
},
multiple: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
clearable: {
type: Boolean,
default: true
}
},
model: {
prop: 'value',
event: 'input'
},
data() {
return {
list: [],
innerValue: '',
listQuery: {
keyword: '',
currentPage: 1,
pageSize: 20
},
total: 0,
checked: '',
checkedTxt: '',
checkedRow: {},
listLoading: false,
visible: false,
inputHovering: false,
}
},
watch: {
value(val) {
this.setDefault()
}
},
computed: {
showClose() {
let hasValue = this.multiple
? Array.isArray(this.value) && this.value.length > 0
: this.value !== undefined && this.value !== null && this.value !== '';
let criteria = this.clearable &&
!this.disabled &&
this.inputHovering &&
hasValue;
return criteria;
},
propsLabel() {
return this.columnOptions[0].value
}
},
created() {
this.listQuery.pageSize = this.hasPage ? this.pageSize : 100000
this.setDefault()
},
methods: {
initData() {
if (!this.interfaceId) return
this.listLoading = true
const paramList = this.getParamList()
const columnOptions = this.columnOptions.map(o => o.value)
let query = {
...this.listQuery,
interfaceId: this.interfaceId,
propsValue: this.propsValue,
relationField: this.relationField,
columnOptions: columnOptions.join(','),
paramList
}
getDataInterfaceDataSelect(this.interfaceId, query).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
}).catch(() => { this.listLoading = false })
},
getParamList() {
let templateJson = this.templateJson
if (!this.formData) return templateJson
for (let i = 0; i < templateJson.length; i++) {
if (templateJson[i].relationField) {
if (templateJson[i].relationField.includes('-')) {
let tableVModel = templateJson[i].relationField.split('-')[0]
let childVModel = templateJson[i].relationField.split('-')[1]
templateJson[i].defaultValue = this.formData[tableVModel] && this.formData[tableVModel][this.rowIndex] && this.formData[tableVModel][this.rowIndex][childVModel] || ''
} else {
templateJson[i].defaultValue = this.formData[templateJson[i].relationField] || ''
}
}
}
return templateJson
},
interfaceDataHandler(data) {
if (!data.dataProcessing) return data.list
const dataHandler = this.jnpf.getScriptFunc.call(this, data.dataProcessing)
if (!dataHandler) return data.list
return dataHandler(data.list)
},
search() {
this.initData()
this.listQuery.currentPage = 1
this.listQuery.pageSize = this.hasPage ? this.pageSize : 10000
},
reset() {
this.listQuery.keyword = this.filterVal
this.listQuery.currentPage = 1
this.listQuery.pageSize = this.hasPage ? this.pageSize : 10000
this.initData()
},
openDialog() {
if (this.disabled) return
this.checked = this.value
this.visible = true
this.reset()
},
clear(event) {
this.checked = ''
this.innerValue = ''
this.checkedRow = {}
this.$emit('input', this.checked)
this.$emit('change', this.checked, this.checkedRow)
dispatch.call(this, 'ElFormItem', 'el.form.change', this.checked)
event.stopPropagation();
},
select() {
if (!this.checked) return
this.innerValue = this.checkedTxt
this.$emit('input', this.checked)
this.$emit('change', this.checked, this.checkedRow)
dispatch.call(this, 'ElFormItem', 'el.form.change', this.checked)
this.visible = false
},
rowClick(row) {
this.checked = row[this.propsValue]
this.checkedTxt = row[this.relationField]
this.checkedRow = row
},
setDefault() {
if (this.value) {
if (!this.interfaceId) return
const paramList = this.getParamList()
let query = {
ids: [this.value],
interfaceId: this.interfaceId,
propsValue: this.propsValue,
relationField: this.relationField,
paramList
}
getDataInterfaceDataInfoByIds(this.interfaceId, query).then(res => {
const data = res.data && res.data.length ? res.data[0] : {}
this.innerValue = data[this.relationField]
if (!this.field) return
let relationData = this.$store.state.generator.relationData
this.$set(relationData, this.field, data)
this.$eventBus.$emit('popupAttrEventBus', relationData, this.field)
this.$store.commit('generator/UPDATE_RELATION_DATA', relationData)
})
} else {
this.innerValue = ''
if (!this.field) return
let relationData = this.$store.state.generator.relationData
this.$set(relationData, this.field, {})
this.$eventBus.$emit('popupAttrEventBus', relationData, this.field)
this.$store.commit('generator/UPDATE_RELATION_DATA', relationData)
}
}
}
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -203,4 +203,4 @@ export default {
// .el-upload-list--picture-card {
// display: inline-block;
// height: 0;
// }</style>
// }</style>

@ -61,6 +61,8 @@ import BillRule from '@/components/Generator/components/BillRule'
import JnpfNumber from '@/components/Generator/components/JnpfNumber'
import JnpfDateRangePicker from '@/components/Generator/components/JnpfDateRangePicker'
import JnpfPopupSelectCus from '@/components/CusJnpf/PopupSelect'
export default {
install(Vue, options) {
@ -125,5 +127,7 @@ export default {
Vue.component('JnpfGroupTitle', JnpfGroupTitle)
Vue.component('JnpfCalculate', JnpfCalculate)
Vue.component('JnpfOpenData', JnpfOpenData)
Vue.component('JnpfPopupSelectCus', JnpfPopupSelectCus)
}
}

@ -1,6 +1,3 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
@ -20,8 +17,8 @@
<el-col :span="24">
<jnpf-form-tip-item label="条款合同类型" prop="contractType">
<JnpfRadio v-model="dataForm.contractType" @change="changeData('contractType', -1)"
optionType="default" direction="horizontal" :style='{ "width": "100%" }' size="default"
:options="contractTypeOptions" :props="contractTypeProps">
optionType="default" direction="horizontal" :style='{ "width": "100%" }'
size="default" :options="contractTypeOptions" :props="contractTypeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
@ -34,8 +31,8 @@
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="条款内容" prop="content">
<JnpfEditor v-model="dataForm.content" @change="changeData('content', -1)" placeholder="请输入"
:style='{ "width": "100%" }'>
<JnpfEditor v-model="dataForm.content" @change="changeData('content', -1)"
placeholder="请输入" :style='{ "width": "100%" }'>
</JnpfEditor>
</jnpf-form-tip-item>
</el-col>
@ -48,7 +45,8 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="条款类型" tipLabel="1.普通条款(直接输出内容条款) 2.商品条款(可根据子表添加商品表格显示)" prop="type">
<jnpf-form-tip-item label="条款类型" tipLabel="1.普通条款(直接输出内容条款) 2.商品条款(可根据子表添加商品表格显示)"
prop="type">
<JnpfRadio v-model="dataForm.type" @change="changeData('type', -1)" optionType="default"
direction="horizontal" size="small" :options="typeOptions" :props="typeProps">
</JnpfRadio>
@ -62,7 +60,7 @@
<el-table :data="dataForm.contractClauseFieldsList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="字段" prop="tbKey">
<template slot="header" v-if="false">
<template slot="header">
<span class="required-sign">*</span>字段
</template>
<template slot-scope="scope">
@ -72,8 +70,8 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="标题" prop="tbTitle">
<template slot="header" v-if="false">
<el-table-column label="标题">
<template slot="header">
<span class="required-sign">*</span>标题
</template>
<template slot-scope="scope">
@ -84,7 +82,7 @@
</template>
</el-table-column>
<el-table-column label="排序" prop="sort">
<template slot="header" v-if="false">
<template slot="header">
<span class="required-sign">*</span>排序
</template>
<template slot-scope="scope">
@ -108,17 +106,17 @@
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="备注" prop="remark">
<JnpfTextarea v-model="dataForm.remark" @change="changeData('remark', -1)" placeholder="请输入"
:maxlength="200" clearable :style='{ "width": "100%" }'
<JnpfTextarea v-model="dataForm.remark" @change="changeData('remark', -1)"
placeholder="请输入" :maxlength="200" clearable :style='{ "width": "100%" }'
:autosize='{ "minRows": 4, "maxRows": 4 }'>
</JnpfTextarea>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="状态" prop="status">
<JnpfRadio v-model="dataForm.status" @change="changeData('status', -1)" optionType="default"
direction="horizontal" :style='{ "width": "100%" }' size="default" :options="statusOptions"
:props="statusProps">
<JnpfRadio v-model="dataForm.status" @change="changeData('status', -1)"
optionType="default" direction="horizontal" :style='{ "width": "100%" }'
size="default" :options="statusOptions" :props="statusProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
@ -410,6 +408,18 @@ export default {
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (this.dataForm.contractClauseFieldsList && this.dataForm.contractClauseFieldsList.length > 0) {
let hasEmpt = this.dataForm.contractClauseFieldsList.filter((o1) => {
if (o1.tbKey && o1.tbTitle && o1.sort) {
return true
}
return false
})
if (hasEmpt) {
valid = false
this.$message({ type: 'error', message: '条款内控制字段必填' });
}
}
if (valid) {
if (!this.contractclausefieldsExist()) return
this.request()
@ -595,3 +605,8 @@ export default {
}
</script>
<style>
.required-sign {
color: red;
}
</style>

@ -6,12 +6,10 @@
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="合同类型">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">合同类型</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('contractType')">
<jnpf-form-tip-item label="合同类型" tipLabel="不同的合同类型可编辑的字段内容不同,合同类型一旦保存不可修改,请选择更匹配你需求的一个。"
@ -23,24 +21,23 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="基本信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基本信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('contractTemplateId')">
<jnpf-form-tip-item label="合同模板" v-if="judgeShow('contractTemplateId')"
prop="contractTemplateId">
<JnpfPopupSelect v-model="dataForm.contractTemplateId"
<JnpfPopupSelectCus v-model="dataForm.contractTemplateId"
@change="changeData('contractTemplateId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.contractTemplateId" placeholder="请选择"
:disabled="judgeWrite('contractTemplateId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='contractTemplateId'
popupTitle="选择合同模板" popupType="dialog" relationField='name' field='contractTemplateId'
interfaceId="528856731099332613" :pageSize="20"
:columnOptions="contractTemplateIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
:columnOptions="contractTemplateIdcolumnOptions" clearable :style='{ "width": "100%" }'
:filterVal="filterValContractTemplate">
</JnpfPopupSelectCus>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('contractNumber')">
@ -115,12 +112,10 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="主体信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">主体信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('deptId')">
<jnpf-form-tip-item label="签约主体" v-if="judgeShow('deptId')" prop="deptId">
@ -166,12 +161,10 @@
</template>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="财务信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">财务信息</span>
</div>
</el-col>
<el-col :span="24">
<el-table :data="subjectList" size='mini' style="margin-bottom: 20px;">
@ -222,12 +215,10 @@
</el-table>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="合同信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">合同信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('procurementModel')">
<template v-if="dataForm.contractType == 1">
@ -313,12 +304,10 @@
</template>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="交货和运输信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">交货和运输信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryModel')">
<jnpf-form-tip-item label="交货方式" v-if="judgeShow('deliveryModel')" prop="deliveryModel">
@ -356,12 +345,10 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content=" 合同条款信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">合同条款信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('pricingModel')">
<jnpf-form-tip-item label="定价模式 " v-if="judgeShow('pricingModel')" prop="pricingModel">
@ -371,336 +358,11 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<!-- <el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2>价格公式</h2>
</div>
<el-table :data="dataForm.contractLPriceFormulaList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="公式编码" v-if="judgeShow('contractlpriceformula-priceFormulaCode')"
prop="priceFormulaCode">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-priceFormulaCode')">*</span>公式编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.priceFormulaCode"
@change="changeData('contractlpriceformula-priceFormulaCode', scope.$index)"
placeholder="系统自动生成"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-priceFormulaCode')"
readonly :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="价格公式类型" v-if="judgeShow('contractlpriceformula-priceFormulaType')"
prop="priceFormulaType">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-priceFormulaType')">*</span>价格公式类型
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.priceFormulaType"
@change="changeData('contractlpriceformula-priceFormulaType', scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-priceFormulaType')"
clearable :style='{ "width": "100%" }'
:options="contractlpriceformulapriceFormulaTypeOptions"
:props="contractlpriceformulapriceFormulaTypeProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="固定利润1" v-if="judgeShow('contractlpriceformula-fixedProfit1')"
prop="fixedProfit1">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-fixedProfit1')">*</span>固定利润1
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.fixedProfit1"
@change="changeData('contractlpriceformula-fixedProfit1', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-fixedProfit1')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="固定利润2" v-if="judgeShow('contractlpriceformula-fixedProfit2')"
prop="fixedProfit2">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-fixedProfit2')">*</span>固定利润2
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.fixedProfit2"
@change="changeData('contractlpriceformula-fixedProfit2', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-fixedProfit2')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="固定金额" v-if="judgeShow('contractlpriceformula-fixedAmount')"
prop="fixedAmount">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-fixedAmount')">*</span>固定金额
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.fixedAmount"
@change="changeData('contractlpriceformula-fixedAmount', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-fixedAmount')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="户头费" v-if="judgeShow('contractlpriceformula-accountCost')"
prop="accountCost">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-accountCost')">*</span>户头费
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.accountCost"
@change="changeData('contractlpriceformula-accountCost', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-accountCost')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="装卸费" v-if="judgeShow('contractlpriceformula-handleCost')"
prop="handleCost">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-handleCost')">*</span>装卸费
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.handleCost"
@change="changeData('contractlpriceformula-handleCost', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-handleCost')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="倒运费" v-if="judgeShow('contractlpriceformula-reshipmentCost')"
prop="reshipmentCost">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-reshipmentCost')">*</span>倒运费
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.reshipmentCost"
@change="changeData('contractlpriceformula-reshipmentCost', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-reshipmentCost')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其它费用1" v-if="judgeShow('contractlpriceformula-otherCost1')"
prop="otherCost1">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-otherCost1')">*</span>其它费用1
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.otherCost1"
@change="changeData('contractlpriceformula-otherCost1', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-otherCost1')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其它费用2" v-if="judgeShow('contractlpriceformula-otherCost2')"
prop="otherCost2">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-otherCost2')">*</span>其它费用2
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.otherCost2"
@change="changeData('contractlpriceformula-otherCost2', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-otherCost2')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其它费用3" v-if="judgeShow('contractlpriceformula-otherCost3')"
prop="otherCost3">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-otherCost3')">*</span>其它费用3
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.otherCost3"
@change="changeData('contractlpriceformula-otherCost3', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-otherCost3')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其它费用4" v-if="judgeShow('contractlpriceformula-otherCost4')"
prop="otherCost4">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-otherCost4')">*</span>其它费用4
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.otherCost4"
@change="changeData('contractlpriceformula-otherCost4', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-otherCost4')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算吨数" v-if="judgeShow('contractlpriceformula-settlementTonnage')"
prop="settlementTonnage">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-settlementTonnage')">*</span>结算吨数
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementTonnage"
@change="changeData('contractlpriceformula-settlementTonnage', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-settlementTonnage')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="对应吨数" v-if="judgeShow('contractlpriceformula-correspondTonnage')"
prop="correspondTonnage">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-correspondTonnage')">*</span>对应吨数
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.correspondTonnage"
@change="changeData('contractlpriceformula-correspondTonnage', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-correspondTonnage')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售吨数" v-if="judgeShow('contractlpriceformula-saleTonnage')"
prop="saleTonnage">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-saleTonnage')">*</span>销售吨数
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.saleTonnage"
@change="changeData('contractlpriceformula-saleTonnage', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-saleTonnage')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('contractlpriceformula-taxRate')"
prop="taxRate">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-taxRate')">*</span>税率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxRate"
@change="changeData('contractlpriceformula-taxRate', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-taxRate')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="客户税负率" v-if="judgeShow('contractlpriceformula-taxRateCustomer')"
prop="taxRateCustomer">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-taxRateCustomer')">*</span>客户税负率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxRateCustomer"
@change="changeData('contractlpriceformula-taxRateCustomer', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-taxRateCustomer')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="黄牛税负率" v-if="judgeShow('contractlpriceformula-taxRateYellowBull')"
prop="taxRateYellowBull">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-taxRateYellowBull')">*</span>黄牛税负率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxRateYellowBull"
@change="changeData('contractlpriceformula-taxRateYellowBull', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-taxRateYellowBull')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="开票公司税负率"
v-if="judgeShow('contractlpriceformula-taxRateInvoicingCompany')"
prop="taxRateInvoicingCompany">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-taxRateInvoicingCompany')">*</span>开票公司税负率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxRateInvoicingCompany"
@change="changeData('contractlpriceformula-taxRateInvoicingCompany', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-taxRateInvoicingCompany')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="资金利率" v-if="judgeShow('contractlpriceformula-fundRate')"
prop="fundRate">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlpriceformulaList-fundRate')">*</span>资金利率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.fundRate"
@change="changeData('contractlpriceformula-fundRate', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlpriceformulaList') || judgeWrite('contractlpriceformulaList-fundRate')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50" v-if="!judgeWrite('contractlpriceformulaList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delcontractLPriceFormulaList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addcontractLPriceFormulaList()"
v-if="!judgeWrite('contractlpriceformulaList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col> -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="商品明细">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品明细</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('contractlpriceformula-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
@ -856,12 +518,10 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="费用条款">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">费用条款</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('contractlcommodity-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
@ -926,12 +586,10 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="付款节点">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">付款节点</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('contractlfeeclause-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
@ -1035,22 +693,26 @@
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" v-if="judgeShow('amountCapitalization')">
<el-col :span="12">
<jnpf-form-tip-item label="大写金额(人民币)">
{{ dataForm.amountCapitalization }}
</jnpf-form-tip-item>
</el-col>
<!-- <el-col :span="12" v-if="judgeShow('amountCapitalization')">
<jnpf-form-tip-item label="大写金额(人民币)" v-if="judgeShow('amountCapitalization')"
prop="amountCapitalization">
<JnpfInput v-model="dataForm.amountCapitalization"
<JnpfInputNumber v-model="dataForm.amountCapitalization"
@change="changeData('amountCapitalization', -1)" placeholder="请输入"
:disabled="judgeWrite('amountCapitalization')" clearable :style='{ "width": "100%" }'>
</JnpfInput>
:disabled="judgeWrite('amountCapitalization')" clearable :style='{ "width": "100%" }'
isAmountChinese=true>
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="其他信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">其他信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('contractRequirement')">
<jnpf-form-tip-item label="合同要求" v-if="judgeShow('contractRequirement')"
@ -1071,12 +733,10 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="附件信息">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">附件信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('contractAppendices')">
<jnpf-form-tip-item label="合同附件" v-if="judgeShow('contractAppendices')"
@ -1123,12 +783,10 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{ "color": "#62A2CB", "font-weight": "bold", "text-decoration": "none", "font-size": 16, "line-height": 32, "font-style": "normal", "text-align": "center" }'
content="合同标签">
</JnpfText>
</jnpf-form-tip-item>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">合同标签</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('contractLabel')">
<jnpf-form-tip-item label="合同标签" v-if="judgeShow('contractLabel')" prop="contractLabel">
@ -1159,7 +817,7 @@ import { getDataInterfaceDataSelect } from '@/api/systemData/dataInterface'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
import { getAmountChinese, thousandsFormat } from "@/components/Generator/utils/index"
import dayjs from 'dayjs'
export default {
mixins: [comMixin],
@ -1288,7 +946,7 @@ export default {
contractSignedTime: dayjs().valueOf(),
businessId: undefined,
contractPeriodTime: dayjs().valueOf(),
contractPeriodTimeEnd: dayjs().add(1,'year').valueOf(),
contractPeriodTimeEnd: dayjs().add(1, 'year').valueOf(),
deptId: [],
subject: "522407918746741061",
procurementModel: undefined,
@ -1402,13 +1060,6 @@ export default {
trigger: ["blur", "change"]
},
],
amountCapitalization: [
{
required: true,
message: '请输入',
trigger: 'blur'
},
],
},
contractTypeOptions: [],
contractTypeProps: { "label": "fullName", "value": "enCode" },
@ -1527,6 +1178,18 @@ export default {
computed: {
formOperates() {
return this.setting.formOperates
},
filterValContractTemplate() {
let opts = this.contractTypeOptions
let optType = this.dataForm.contractType
let optNow = opts.filter((o1) => {
return o1.enCode == optType
})
if (optNow && optNow.length > 0) {
return optNow[0]['fullName']
} else {
return ''
}
}
},
watch: {
@ -1540,6 +1203,9 @@ export default {
'dataForm.subject': function (val, oldVal) {
this.getSubjectInfo()
},
'dataForm.totalAmount': function (val, oldVal) {
this.dataForm.amountCapitalization = getAmountChinese(val)
},
},
created() {
this.getFormById()

@ -264,7 +264,16 @@
<el-row>
<el-col :span="24"
style="background-color: white;border: solid 1px gray;height:900px;overflow-y: auto;">
cs
<vue-html2pdf :show-layout="false" :float-layout="true" :enable-download="true"
:preview-modal="true" :paginate-elements-by-height="1400" filename="hee hee"
:pdf-quality="2" :manual-pagination="false" pdf-format="a4"
pdf-orientation="landscape" pdf-content-width="800px" @progress="onProgress($event)"
@hasStartedGeneration="hasStartedGeneration()" @hasGenerated="hasGenerated($event)"
ref="html2Pdf">
<section slot="pdf-content">=
sslddddddddddddddddddddddd
</section>
</vue-html2pdf>
</el-col>
</el-row>
</el-col>
@ -284,9 +293,11 @@ import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
// import * as pdfjsDist from "pdfjs-dist"
//import VueHtml2pdf from 'vue-html2pdf'
export default {
components: {},
components: {
// VueHtml2pdf
},
props: [],
data() {
return {
@ -327,22 +338,22 @@ export default {
type: undefined,
status: "2",
remark: undefined,
contractCode: undefined,
contractName: undefined,
openSupplierA: undefined,
openBuyerB: undefined,
openSignTime: undefined,
openSignedAt: undefined,
openUnitName: undefined,
openLegalRepresentative: undefined,
openEntrustedAgent: undefined,
openUnitAddress: undefined,
openPhone: undefined,
openFax: undefined,
openBank: undefined,
openAccountNumber: undefined,
openSignTimeB: undefined,
openSignedAtB: undefined,
contractCode: "2",
contractName: "2",
openSupplierA: "2",
openBuyerB: "2",
openSignTime: "2",
openSignedAt: "2",
openUnitName: "2",
openLegalRepresentative: "2",
openEntrustedAgent: "2",
openUnitAddress: "2",
openPhone: "2",
openFax: "2",
openBank: "2",
openAccountNumber: "2",
openSignTimeB: "2",
openSignedAtB: "2",
creatorTime: undefined,
creatorUserId: undefined,
lastModifyTime: undefined,
@ -562,6 +573,9 @@ export default {
},
mounted() { },
methods: {
generateReport() {
this.$refs.html2Pdf.generatePdf()
},
prev() {
this.index--
if (this.index === 0) {

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -58,7 +58,7 @@
<el-col :span="8" v-if="judgeShow('voucherPictures')">
<jnpf-form-tip-item label="凭证图片" v-if="judgeShow('voucherPictures')" prop="voucherPictures">
<JnpfUploadPoundsImg v-model="dataForm.voucherPictures" @change="poundlistUploadSuccess"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath"
:isAccount="0">
</JnpfUploadPoundsImg>
</jnpf-form-tip-item>
@ -118,11 +118,11 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('voucherproduct-productId', scope.$index)" :rowIndex="scope.$index"
@change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -216,7 +216,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -229,7 +229,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -237,9 +237,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -383,7 +383,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -399,7 +399,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName"
@ -559,8 +559,8 @@ export default {
currVmodel: "",
dataForm: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -790,17 +790,37 @@ export default {
methods: {
//
poundlistUploadSuccess(val, res) {
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.netWeight = '';
this.dataForm.tareWeight = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
//
vehicleInfo(val, val2) {
@ -836,6 +856,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -908,6 +931,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -915,6 +947,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -84,10 +84,20 @@
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" width="100" fixed="left">
<!-- <el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" width="100" fixed="left">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" sortable align="center" width="160">
</el-table-column>
@ -135,16 +145,6 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -325,6 +325,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let supplyFlag = false
let customFlag = false
selectData.every(function (item) {
@ -366,6 +380,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isTransferFlag = false
let orderFlag = false
selectData.every(function (item) {

@ -400,7 +400,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库货区" v-if="judgeShow('warehousingproduct-storageAreaId')"
<el-table-column label="库货区" v-if="judgeShow('warehousingproduct-storageAreaId')"
prop="storageAreaId">
<template slot="header">
<span class="required-sign"
@ -424,7 +424,7 @@
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="库单位"
<el-table-column label="库单位"
v-if="judgeShow('warehousingproduct-warehousingUnitId')" prop="warehousingUnitId">
<template slot="header">
<span class="required-sign"

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -118,11 +118,11 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('voucherproduct-productId', scope.$index)" :rowIndex="scope.$index"
@change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -216,7 +216,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -229,7 +229,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -237,9 +237,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -424,7 +424,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -439,7 +439,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName"
@ -595,8 +595,8 @@ export default {
currVmodel: "",
dataForm: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -861,19 +861,34 @@ export default {
},
//
poundlistUploadSuccess(val, res) {
console.log('已选择并传递的数据', res.data);
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
//
@ -910,6 +925,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -982,6 +1000,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -989,6 +1016,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -87,10 +87,20 @@
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus" sortable align="center" width="100" fixed="left">
<!-- <el-table-column label="凭证状态" prop="voucherStatus" sortable align="center" width="100" fixed="left">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" sortable align="center" width="160">
</el-table-column>
@ -145,7 +155,7 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<!-- <el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
@ -154,7 +164,7 @@
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -345,6 +355,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
const customId = selectData[0].customerId
let customerIdFlag = false
let purchaseFlag = false
@ -387,6 +411,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isTransferFlag = false
let purchaseFlag = false
selectData.every(function (item) {

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -58,7 +58,7 @@
<el-col :span="8" v-if="judgeShow('voucherPictures')">
<jnpf-form-tip-item label="凭证图片" v-if="judgeShow('voucherPictures')" prop="voucherPictures">
<JnpfUploadPoundsImg v-model="dataForm.voucherPictures" @change="poundlistUploadSuccess"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath"
:isAccount="0">
</JnpfUploadPoundsImg>
</jnpf-form-tip-item>
@ -118,10 +118,10 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="productInfo" :rowIndex="scope.$index"
<JnpfPopupSelect v-model="scope.row.productId" @change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -215,7 +215,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -228,7 +228,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -236,9 +236,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -382,7 +382,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -397,7 +397,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName" @change="true" placeholder="请输入"
@ -554,8 +554,8 @@ export default {
dataForm: {
isSaleDeliveryVoucherSource: undefined,
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -817,16 +817,35 @@ export default {
},
//
poundlistUploadSuccess(val, res) {
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
changeData(model, index) {
this.isEdit = false
@ -851,6 +870,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -923,6 +945,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -930,6 +961,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -86,10 +86,20 @@
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" fixed="left" width="100">
<!-- <el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" fixed="left" width="100">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" sortable align="center" width="160">
</el-table-column>
@ -136,7 +146,7 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<!-- <el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
@ -145,7 +155,7 @@
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -336,6 +346,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isSaleFlag = false
let saleFlag = false
selectData.every(function (item) {
@ -378,6 +402,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isTransferFlag = false
let saleFlag = false
selectData.every(function (item) {

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -58,7 +58,7 @@
<el-col :span="8" v-if="judgeShow('voucherPictures')">
<jnpf-form-tip-item label="凭证图片" v-if="judgeShow('voucherPictures')" prop="voucherPictures">
<JnpfUploadPoundImg v-model="dataForm.voucherPictures" @change="poundlistUploadSuccess"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath"
:isAccount="0">
</JnpfUploadPoundImg>
</jnpf-form-tip-item>
@ -118,11 +118,11 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('voucherproduct-productId', scope.$index)" :rowIndex="scope.$index"
@change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -216,7 +216,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -229,7 +229,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -237,9 +237,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -383,7 +383,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -398,7 +398,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName"
@ -554,8 +554,8 @@ export default {
currVmodel: "",
dataForm: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -796,18 +796,35 @@ export default {
},
//
poundlistUploadSuccess(val, res) {
console.log('已选择并传递的数据', res.data);
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
changeData(model, index) {
this.isEdit = false
@ -832,6 +849,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -904,6 +924,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -911,6 +940,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -72,22 +72,32 @@
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column border>
<el-table-column prop="voucherCode" label="凭证编号" sortable align="center" width="160">
<el-table-column prop="voucherCode" label="凭证编号" fixed="left" sortable align="center" width="160">
</el-table-column>
<el-table-column label="单据类型" prop="documentType1" align="center" width="100">
<el-table-column label="单据类型" prop="documentType1" fixed="left" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.documentType1 }}
</template>
</el-table-column>
<el-table-column label="凭证类型" prop="voucherType1" align="center" width="100">
<el-table-column label="凭证类型" prop="voucherType1" fixed="left" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus1" align="center" width="100">
<!-- <el-table-column label="凭证状态" prop="voucherStatus1" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" align="center" width="160">
</el-table-column>
@ -139,7 +149,7 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<!-- <el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
@ -148,7 +158,7 @@
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -330,6 +340,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
const customerId = selectData[0].customerId
let isReturnCargoFlag = false
let customerFlag = false
@ -372,6 +396,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isReturnCargoFlag = false
let returnCargoFlag = false
selectData.every(function (item) {

Loading…
Cancel
Save