commit
0ea57d94b6
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.invoices.mapper.InvoicesMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.purchaseback.mapper.PurchasebackMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.tradeupload.mapper.TradeuploadMapper">
|
||||
|
||||
<select id="queryVehicle" resultType="jnpf.tradeupload.entity.TradeuploadEntity">
|
||||
select
|
||||
*
|
||||
from
|
||||
jg_poundlist
|
||||
where
|
||||
vehicle_id = #{vehicleId} and
|
||||
gross_weight = #{grossWeight} and
|
||||
tare_weight = #{tareWeight} and
|
||||
net_weight = #{netWeight} and
|
||||
creator_time = DATE_SUB(NOW(),interval 15 day)
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.invoices.mapper.InvoicesMapper">
|
||||
<select id="queryByKeyword" resultType="jnpf.invoices.entity.InvoicesEntity">
|
||||
SELECT a.*,b.document_no purchaseorderId,c.contract_name contractId,d.supplier_name supplierId
|
||||
from jg_invoices a
|
||||
LEFT JOIN jg_purchaseorder b on a.purchaseorder_id = b.id
|
||||
LEFT JOIN jg_contract c on a.contract_id = c.id
|
||||
LEFT JOIN jg_supplier d on a.supplier_id = d.id
|
||||
where 1=1
|
||||
<if test="invoicesPagination.startDate != null and invoicesPagination.endDate != null">
|
||||
AND a.creator_time > #{invoicesPagination.startDate} AND a.creator_time <= #{invoicesPagination.endDate}
|
||||
</if>
|
||||
<if test="invoicesPagination.documentNo != null and invoicesPagination.documentNo != ''">
|
||||
AND a.document_no LIKE CONCAT('%',#{invoicesPagination.documentNo},'%')
|
||||
</if>
|
||||
<if test="invoicesPagination.souceno != null and invoicesPagination.souceno != ''">
|
||||
AND b.document_no LIKE CONCAT('%',#{invoicesPagination.souceno},'%')
|
||||
</if>
|
||||
<if test="invoicesPagination.supplierName != null and invoicesPagination.supplierName != ''">
|
||||
AND d.supplier_name LIKE CONCAT('%',#{invoicesPagination.supplierName},'%')
|
||||
</if>
|
||||
<if test="invoicesPagination.purchaseName != null and invoicesPagination.purchaseName != ''">
|
||||
AND c.contract_name LIKE CONCAT('%',#{invoicesPagination.purchaseName},'%')
|
||||
</if>
|
||||
<if test="invoicesPagination.sidx != null and invoicesPagination.sidx != ''">
|
||||
ORDER BY ${invoicesPagination.sidx} ${invoicesPagination.sort}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.purchaseback.mapper.PurchasebackMapper">
|
||||
<select id="queryByKeyword" resultType="jnpf.purchaseback.entity.PurchasebackEntity">
|
||||
SELECT a.*,b.document_no purchaseorderdocumentno,c.contract_name contractName,d.supplier_name supplierName
|
||||
from jg_purchaseback a
|
||||
LEFT JOIN jg_purchaseorder b on a.purchase_order_id = b.id
|
||||
LEFT JOIN jg_contract c on b.contract_code = c.id
|
||||
LEFT JOIN jg_supplier d on b.supplier_id = d.id
|
||||
where 1=1
|
||||
<if test="purchasebackPagination.documentNo != null and purchasebackPagination.documentNo != ''">
|
||||
AND a.document_no LIKE CONCAT('%',#{purchasebackPagination.documentNo},'%')
|
||||
</if>
|
||||
<if test="purchasebackPagination.sidx != null and purchasebackPagination.sidx != ''">
|
||||
ORDER BY ${purchasebackPagination.sidx} ${purchasebackPagination.sort}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -1,7 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.receiptin.mapper.ReceiptinMapper">
|
||||
|
||||
<select id="queryByKeyword" resultType="jnpf.receiptin.entity.ReceiptinEntity">
|
||||
SELECT a.*,b.document_no purchaseorderSouceno,d.supplier_name supplier
|
||||
from jg_receiptin a
|
||||
LEFT JOIN jg_purchaseorder b on a.souceno = b.id
|
||||
LEFT JOIN jg_supplier d on a.supplier_id = d.id
|
||||
where 1=1
|
||||
<if test="receiptinPagination.startDate != null and receiptinPagination.endDate != null">
|
||||
AND a.creator_time > #{receiptinPagination.startDate} AND a.creator_time <= #{receiptinPagination.endDate}
|
||||
</if>
|
||||
<if test="receiptinPagination.documentNo != null and receiptinPagination.documentNo != ''">
|
||||
AND a.document_no LIKE CONCAT('%',#{receiptinPagination.documentNo},'%')
|
||||
</if>
|
||||
<if test="receiptinPagination.souceno != null and receiptinPagination.souceno != ''">
|
||||
AND b.document_no LIKE CONCAT('%',#{receiptinPagination.souceno},'%')
|
||||
</if>
|
||||
<if test="receiptinPagination.supplierName != null and receiptinPagination.supplierName != ''">
|
||||
AND d.supplier_name LIKE CONCAT('%',#{receiptinPagination.supplierName},'%')
|
||||
</if>
|
||||
<if test="receiptinPagination.sidx != null and receiptinPagination.sidx != ''">
|
||||
ORDER BY ${receiptinPagination.sidx} ${receiptinPagination.sort}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.tradeupload.mapper.TradeuploadMapper">
|
||||
|
||||
<select id="queryVehicle" resultType="jnpf.tradeupload.entity.TradeuploadEntity">
|
||||
select
|
||||
*
|
||||
from
|
||||
jg_poundlist
|
||||
where
|
||||
vehicle_id = #{vehicleId} and
|
||||
gross_weight = #{grossWeight} and
|
||||
tare_weight = #{tareWeight} and
|
||||
net_weight = #{netWeight} and
|
||||
creator_time = DATE_SUB(NOW(),interval 15 day)
|
||||
</select>
|
||||
|
||||
<select id="queryByKeyword" resultType="jnpf.tradeupload.entity.TradeuploadEntity">
|
||||
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo
|
||||
from jg_poundlist a
|
||||
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
|
||||
LEFT JOIN jg_supplier c on a.supplier_id = c.id
|
||||
LEFT JOIN jg_customer d on a.customer_id = d.id
|
||||
LEFT JOIN jg_material e on a.material_id = e.id
|
||||
LEFT JOIN jg_contract f on a.sales_id = f.id
|
||||
LEFT JOIN jg_contract g on a.purchase_id = g.id
|
||||
LEFT JOIN base_user h on a.business_id = h.f_id
|
||||
LEFT JOIN jg_natural i on a.natural_id = i.id
|
||||
where a.is_examine = '0'
|
||||
<if test="tradeuploadPagination.keyword != null and tradeuploadPagination.keyword != ''">
|
||||
AND (b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%'))
|
||||
</if>
|
||||
<if test="tradeuploadPagination.startDate != null and tradeuploadPagination.endDate != null">
|
||||
AND a.POUND_DATE > #{tradeuploadPagination.startDate} AND a.POUND_DATE <= #{tradeuploadPagination.endDate}
|
||||
</if>
|
||||
<if test="tradeuploadPagination.poundlistNo != null and tradeuploadPagination.poundlistNo != ''">
|
||||
AND a.POUNDLIST_NO LIKE CONCAT('%',#{tradeuploadPagination.poundlistNo},'%')
|
||||
</if>
|
||||
<if test="tradeuploadPagination.materialName != null and tradeuploadPagination.materialName != ''">
|
||||
AND e.item_name LIKE CONCAT('%',#{tradeuploadPagination.materialName},'%')
|
||||
</if>
|
||||
<if test="tradeuploadPagination.vehicleName != null and tradeuploadPagination.vehicleName != ''">
|
||||
AND b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.vehicleName},'%')
|
||||
</if>
|
||||
<if test="tradeuploadPagination.salesName != null and tradeuploadPagination.salesName != ''">
|
||||
AND f.contract_name LIKE CONCAT('%',#{tradeuploadPagination.salesName},'%')
|
||||
</if>
|
||||
|
||||
<if test="tradeuploadPagination.customerName != null and tradeuploadPagination.customerName != ''">
|
||||
AND d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.customerName},'%')
|
||||
</if>
|
||||
<if test="tradeuploadPagination.sidx != null and tradeuploadPagination.sidx != ''">
|
||||
ORDER BY ${tradeuploadPagination.sidx} ${tradeuploadPagination.sort}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
@ -1,203 +1,221 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
|
||||
:close-on-click-modal="false" append-to-body
|
||||
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
||||
width="800px">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
|
||||
<template v-if="!loading">
|
||||
<el-col :span="24">
|
||||
<el-form-item label-width="0">
|
||||
<JNPF-Text :style='{"width":"100%"}'
|
||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}'
|
||||
value="自然人档案">
|
||||
</JNPF-Text>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名"
|
||||
prop="name">
|
||||
<el-input v-model="dataForm.name"
|
||||
placeholder="请输入姓名" clearable :style='{"width":"100%"}'>
|
||||
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" :close-on-click-modal="false" append-to-body
|
||||
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="left">
|
||||
<template v-if="!loading">
|
||||
<el-col :span="24">
|
||||
<el-form-item label-width="0">
|
||||
<JNPF-Text :style='{ "width": "100%" }'
|
||||
:textStyle='{ "color": "#000000", "font-weight": "normal", "text-decoration": "none", "font-size": 18, "line-height": 32, "font-style": "normal", "text-align": "left" }'
|
||||
value="自然人档案">
|
||||
</JNPF-Text>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="请输入姓名" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="地址"
|
||||
prop="adress">
|
||||
<el-input v-model="dataForm.adress"
|
||||
placeholder="请输入地址" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="地址" prop="adress">
|
||||
<el-input v-model="dataForm.adress" placeholder="请输入地址" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="手机号"
|
||||
prop="contact">
|
||||
<el-input v-model="dataForm.contact"
|
||||
placeholder="请输入手机号" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="手机号" prop="contact">
|
||||
<el-input v-model="dataForm.contact" placeholder="请输入手机号" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="录入人"-->
|
||||
<!-- prop="creatorUserName">-->
|
||||
<!-- <el-input v-model="dataForm.creatorUserName"-->
|
||||
<!-- placeholder="请输入录入人" clearable :style='{"width":"100%"}'>-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证" prop="identity">
|
||||
<el-input v-model="dataForm.identity" placeholder="请输入身份证" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="创建时间"-->
|
||||
<!-- prop="creatorTime">-->
|
||||
<!-- <el-input v-model="dataForm.creatorTime"-->
|
||||
<!-- placeholder="系统自动生成" readonly>-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="银行账户" prop="bankAccount">
|
||||
<el-input v-model="dataForm.bankAccount" placeholder="请输入银行账户" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="开户行" prop="bank">
|
||||
<el-input v-model="dataForm.bank" placeholder="请输入开户行" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="行号" prop="bankNo">
|
||||
<el-input v-model="dataForm.bankNo" placeholder="请输入行号" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="证件照" prop="photos">
|
||||
<JNPF-UploadImg v-model="dataForm.photos" :fileSize="5" sizeUnit="MB" :limit="9">
|
||||
|
||||
</JNPF-UploadImg>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="录入人" prop="creatorUserName">
|
||||
<el-input v-model="dataForm.creatorUserName" placeholder="请输入录入人" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
|
||||
export default {
|
||||
import request from '@/utils/request'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
name: '',
|
||||
adress: '',
|
||||
contact: '',
|
||||
creatorUserName: '',
|
||||
creatorTime: ''
|
||||
},
|
||||
rules:
|
||||
{
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
contact: [{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
},]
|
||||
}
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
name: '',
|
||||
adress: '',
|
||||
contact: '',
|
||||
identity: '',
|
||||
bankAccount: '',
|
||||
bank: '',
|
||||
bankNo: '',
|
||||
photos: [],
|
||||
creatorUserName: '',
|
||||
creatorTime: "",
|
||||
},
|
||||
rules:
|
||||
{
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
clearData(data) {
|
||||
for (let key in data) {
|
||||
if (data[key] instanceof Array) {
|
||||
data[key] = []
|
||||
} else if (data[key] instanceof Object) {
|
||||
this.clearData(data[key])
|
||||
} else {
|
||||
data[key] = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
init(id, isDetail) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.isDetail = isDetail || false
|
||||
this.$nextTick(() => {
|
||||
this.$refs['elForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/Jg_natural/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.clearData(this.dataForm)
|
||||
}
|
||||
})
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/example/Jg_natural',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/example/Jg_natural/' + this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
clearData(data) {
|
||||
for (let key in data) {
|
||||
if (data[key] instanceof Array) {
|
||||
data[key] = [];
|
||||
} else if (data[key] instanceof Object) {
|
||||
this.clearData(data[key]);
|
||||
} else {
|
||||
data[key] = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
init(id, isDetail) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.isDetail = isDetail || false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['elForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/Jg_natural/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
} else {
|
||||
this.clearData(this.dataForm)
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm))
|
||||
return _data
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
this.dataForm = _dataAll
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/example/Natural',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/example/Jg_natural/' + this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
_data.photos = JSON.stringify(_data.photos)
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
_dataAll.photos = JSON.parse(_dataAll.photos)
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -1,264 +1,283 @@
|
||||
<template>
|
||||
<div class="JNPF-common-layout">
|
||||
<div class="JNPF-common-layout">
|
||||
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="query.name" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="query.contact" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()" v-has="'btn_download'">导出
|
||||
</el-button>
|
||||
<!-- <el-button type="text" icon="el-icon-download" v-has="'btn_upload'" @click="">导入-->
|
||||
<!-- </el-button>-->
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" v-has="'btn_batchRemove'" >批量删除
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="JNPF-common-head-right">
|
||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
|
||||
@click="reset()"/>
|
||||
</el-tooltip>
|
||||
<screenfull isContainer/>
|
||||
</div>
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="query.name" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="query.contact" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="银行账户">
|
||||
<el-input v-model="query.bankAccount" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="showAll">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="身份证">
|
||||
<el-input v-model="query.identity" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
|
||||
展开
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
|
||||
收起
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" v-has="'btn_add'" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()" v-has="'btn_download'">导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"
|
||||
v-has="'btn_batchRemove'">批量删除
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="JNPF-common-head-right">
|
||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
|
||||
@click="reset()" />
|
||||
</el-tooltip>
|
||||
<screenfull isContainer />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column prop="name" label="姓名" width="0" align="left" />
|
||||
<el-table-column prop="adress" label="地址" width="0" align="left" />
|
||||
<el-table-column prop="contact" label="手机号" width="0" align="left" />
|
||||
<el-table-column prop="creatorUserName" label="录入人" width="0" align="left" />
|
||||
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left" />
|
||||
<el-table-column prop="identity" label="身份证" width="0" align="left" />
|
||||
<el-table-column prop="bankAccount" label="银行账户" width="0" align="left" />
|
||||
<el-table-column prop="bank" label="开户行" width="0" align="left" />
|
||||
<el-table-column prop="bankNo" label="行号" width="0" align="left" />
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)" v-has="'btn_edit'">编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'"
|
||||
@click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData" />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
|
||||
@selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
|
||||
<el-table-column prop="name" label="姓名" width="300" align="center" fixed="left" sortable
|
||||
/>
|
||||
<el-table-column prop="adress" label="地址" width="300" align="center" sortable
|
||||
/>
|
||||
<el-table-column prop="contact" label="手机号" width="300" align="center" sortable
|
||||
/>
|
||||
<el-table-column prop="creatorUserName" label="录入人" width="300" align="center" sortable
|
||||
/>
|
||||
<el-table-column prop="creatorTime" label="创建时间" width="300" align="center" sortable
|
||||
/>
|
||||
<el-table-column label="操作" fixed="right"
|
||||
width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" v-has="'btn_edit'"
|
||||
@click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)" v-has="'btn_remove'">删除
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData"/>
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
import request from '@/utils/request'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: { JNPFForm, ExportBox, Detail },
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
name: undefined,
|
||||
contact: undefined
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [], total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: 'desc',
|
||||
sidx: 'creatorTime'
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'adress', label: '地址' },
|
||||
{ prop: 'contact', label: '手机号' },
|
||||
{ prop: 'creatorUserName', label: '录入人' },
|
||||
{ prop: 'creatorTime', label: '创建时间' }
|
||||
]
|
||||
}
|
||||
return {
|
||||
showAll: false,
|
||||
detailVisible: false,
|
||||
query: {
|
||||
name: undefined,
|
||||
contact: undefined,
|
||||
bankAccount: undefined,
|
||||
identity: undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [], total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "creatorTime",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'adress', label: '地址' },
|
||||
{ prop: 'contact', label: '手机号' },
|
||||
{ prop: 'creatorUserName', label: '录入人' },
|
||||
{ prop: 'creatorTime', label: '创建时间' },
|
||||
{ prop: 'identity', label: '身份证' },
|
||||
{ prop: 'bankAccount', label: '银行账户' },
|
||||
{ prop: 'bank', label: '开户行' },
|
||||
{ prop: 'bankNo', label: '行号' },
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
goDetail(id) {
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
sortChange({ column, prop, order }) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
}
|
||||
request({
|
||||
url: `/api/example/Jg_natural/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = []
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
let _data = res.data.list[i]
|
||||
_list.push(_data)
|
||||
}
|
||||
this.list = _list
|
||||
this.total = res.data.pagination.total
|
||||
goDetail(id) {
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
sortChange({ column, prop, order }) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true;
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
};
|
||||
request({
|
||||
url: `/api/example/Jg_natural/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = [];
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
let _data = res.data.list[i];
|
||||
_list.push(_data)
|
||||
}
|
||||
this.list = _list
|
||||
console.log(this.list)
|
||||
this.total = res.data.pagination.total
|
||||
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/example/Jg_natural/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
this.listLoading = false
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/example/Jg_natural/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/example/Jg_natural/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/example/Jg_natural/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
|
||||
request({
|
||||
url: `/api/example/Jg_natural/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: 'desc',
|
||||
sidx: 'creatorTime'
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
|
||||
request({
|
||||
url: `/api/example/Jg_natural/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "creatorTime",
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -0,0 +1,764 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'审核'" :close-on-click-modal="false" append-to-body
|
||||
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
|
||||
<template v-if="!loading">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="磅单上传" prop="poundPictures">
|
||||
<JNPF-UploadImg disabled v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1" :disabled="true">
|
||||
|
||||
</JNPF-UploadImg>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆图片" prop="vehiclePictures">
|
||||
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
|
||||
|
||||
</JNPF-UploadImg>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物料名称" prop="materialId">
|
||||
<popupSelect disabled v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId"
|
||||
interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id"
|
||||
relationField="item_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
|
||||
:pageSize="20">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="客户名称" prop="customerId">
|
||||
<popupSelect disabled v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId"
|
||||
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id"
|
||||
relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
|
||||
:pageSize="20" @change="customerSelect">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="销售合同" prop="salesId">
|
||||
<popupSelect disabled v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
|
||||
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
|
||||
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId"
|
||||
hasPage :pageSize="20">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购合同" prop="purchaseId">
|
||||
<popupSelect disabled v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
|
||||
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
|
||||
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
|
||||
hasPage :pageSize="20" @change="customerSelect2">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<popupSelect disabled v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId"
|
||||
interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id"
|
||||
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
|
||||
:pageSize="20" :disabled="true">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购价格" prop="purchasePrice">
|
||||
<el-input-number disabled v-model="dataForm.purchasePrice" :style='{"width":"100%"}' :precision="6"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="销售价格" prop="salesPrice">
|
||||
<el-input-number disabled v-model="dataForm.salesPrice" :style='{"width":"100%"}' :precision="6"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="毛重" prop="grossWeight">
|
||||
<el-input-number disabled v-model="dataForm.grossWeight" :style='{"width":"100%"}' :precision="6"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="皮重" prop="tareWeight">
|
||||
<el-input-number disabled v-model="dataForm.tareWeight" :style='{"width":"100%"}' :precision="6"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="扣重" prop="buckleWeight">
|
||||
<el-input-number disabled v-model="dataForm.buckleWeight" :style='{"width":"100%"}' :precision="6"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="净重" prop="netWeight">
|
||||
<el-input-number disabled v-model="dataForm.netWeight" :style='{"width":"100%"}' :precision="6"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车牌号" prop="vehicleId">
|
||||
<popupSelect disabled v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
|
||||
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id"
|
||||
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="changePicture"
|
||||
hasPage :pageSize="20">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="磅单时间" prop="poundDate">
|
||||
<el-date-picker disabled v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
||||
type="date" format="yyyy-MM-dd" value-format="timestamp">
|
||||
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="磅单号" prop="poundlistNo">
|
||||
<el-input disabled v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单位 " prop="unit">
|
||||
<el-select disabled v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
|
||||
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运输类型" prop="transportType">
|
||||
<el-select disabled v-model="transportType" placeholder="请选择" clearable :style='{"width":"100%"}' @change="transportTypeChange">
|
||||
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否垫资" prop="advance">
|
||||
<el-select disabled v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
|
||||
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运费" prop="transportPrice">
|
||||
<el-input-number disabled v-model="dataForm.transportPrice" :style='{"width":"100%"}' :precision="6"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="起始地" prop="originPlace">
|
||||
<JNPF-Address disabled v-model="dataForm.originPlace" placeholder="请选择省市区" clearable :level='2' >
|
||||
</JNPF-Address>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="业务员1" prop="businessId">
|
||||
<popupSelect disabled v-model="dataForm.businessId" placeholder="请选择业务员1" clearable field="businessId"
|
||||
interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="businessIdcolumnOptions"
|
||||
propsValue="F_Id" relationField="F_RealName" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
|
||||
hasPage :pageSize="20" :bissId="dataForm.businessId">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="业务员2" prop="naturalId">
|
||||
<popupSelect disabled v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId"
|
||||
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id"
|
||||
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入备注信息" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 通 过</el-button>
|
||||
<!-- <el-button type="primary" @click="continueUpload()"> 继续上传</el-button>-->
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
unit: "0",
|
||||
transportType: "0",
|
||||
advance: "0",
|
||||
action: this.define.APIURl + '/api/tradeupload/Tradeupload/UploaderPondList/annexpic',
|
||||
imageUrl: '',
|
||||
code: '100',
|
||||
fileList: [],
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
poundPictures: [],
|
||||
materialId: "",
|
||||
customerId: "",
|
||||
supplierId: "",
|
||||
salesId: "",
|
||||
vehicleId: "",
|
||||
vehiclePictures: [],
|
||||
poundDate: '',
|
||||
poundlistNo: '',
|
||||
tareWeight: 0,
|
||||
grossWeight: 0,
|
||||
buckleWeight: 0,
|
||||
netWeight: 0,
|
||||
unit: "0",
|
||||
transportType: "0",
|
||||
originPlace:[],
|
||||
advance: "0",
|
||||
transportPrice: 0,
|
||||
salesPrice: 0,
|
||||
purchasePrice: 0,
|
||||
businessId: "",
|
||||
naturalId: "",
|
||||
remark: '',
|
||||
creatorTime: "",
|
||||
isExamine: "",
|
||||
},
|
||||
rules: {
|
||||
materialId: [{
|
||||
required: true,
|
||||
message: '请选择物料编码',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
customerId: [{
|
||||
required: true,
|
||||
message: '请选择客户',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
supplierId: [{
|
||||
required: true,
|
||||
message: '请选择供应商',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
purchaseId: [{
|
||||
required: true,
|
||||
message: '请选择采购合同',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
salesId: [{
|
||||
required: true,
|
||||
message: '请选择合同',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
vehicleId: [{
|
||||
required: true,
|
||||
message: '请选择车辆',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
// vehiclePictures: [{
|
||||
// required: true,
|
||||
// message: '请至少选择一个',
|
||||
// trigger: 'click'
|
||||
// }, ],
|
||||
poundDate: [{
|
||||
required: true,
|
||||
message: '请选择',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
poundlistNo: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
tareWeight: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
grossWeight: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
buckleWeight: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
netWeight: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
salesPrice: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
purchasePrice: [{
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
businessId: [{
|
||||
required: true,
|
||||
message: '请选择业务员',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
},
|
||||
materialIdcolumnOptions: [{
|
||||
"label": "物料编码",
|
||||
"value": "item_code"
|
||||
}, {
|
||||
"label": "物料名称",
|
||||
"value": "item_name"
|
||||
}, {
|
||||
"label": "单位",
|
||||
"value": "primary_unit_of_measure"
|
||||
}, {
|
||||
"label": "默认入库区",
|
||||
"value": "in_area"
|
||||
}, {
|
||||
"label": "默认出库区",
|
||||
"value": "out_area"
|
||||
}, ],
|
||||
customerIdcolumnOptions: [{
|
||||
"label": "客户编码",
|
||||
"value": "supplier_cd"
|
||||
}, {
|
||||
"label": "客户名称",
|
||||
"value": "supplier_nm"
|
||||
}, {
|
||||
"label": "地址",
|
||||
"value": "address"
|
||||
}, {
|
||||
"label": "银行账号",
|
||||
"value": "bank_account"
|
||||
}, ],
|
||||
supplierIdcolumnOptions: [{
|
||||
"label": "供应商编码",
|
||||
"value": "supplier_code"
|
||||
}, {
|
||||
"label": "供应商名称",
|
||||
"value": "supplier_name"
|
||||
}],
|
||||
salesIdcolumnOptions: [{
|
||||
"label": "合同编码",
|
||||
"value": "contract_code"
|
||||
}, {
|
||||
"label": "合同名称",
|
||||
"value": "contract_name"
|
||||
}, {
|
||||
"label": "合同类型",
|
||||
"value": "contract_type"
|
||||
}, {
|
||||
"label": "供应商/客户名称",
|
||||
"value": "name"
|
||||
}, ],
|
||||
vehicleIdcolumnOptions: [{
|
||||
"label": "车牌号",
|
||||
"value": "ticketno"
|
||||
}, {
|
||||
"label": "司机",
|
||||
"value": "drivername"
|
||||
}, {
|
||||
"label": "手机号",
|
||||
"value": "contact"
|
||||
}, ],
|
||||
unitOptions: [{
|
||||
"fullName": "吨",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "千克",
|
||||
"id": "1"
|
||||
}],
|
||||
transportTypeOptions: [{
|
||||
"fullName": "汽运",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "船运",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "火车",
|
||||
"id": "2"
|
||||
}],
|
||||
advanceOptions: [{
|
||||
"fullName": "否",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "是",
|
||||
"id": "1"
|
||||
}],
|
||||
businessIdcolumnOptions: [{
|
||||
"label": "人员名称",
|
||||
"value": "F_RealName"
|
||||
}, {
|
||||
"label": "人员职位",
|
||||
"value": "F_FullName"
|
||||
}, ],
|
||||
naturalIdcolumnOptions: [{
|
||||
"label": "业务员2名称",
|
||||
"value": "name"
|
||||
}, {
|
||||
"label": "业务员2手机号",
|
||||
"value": "contact"
|
||||
}, {
|
||||
"label": "业务员2地址",
|
||||
"value": "adress"
|
||||
}, ],
|
||||
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
unitChange(e){
|
||||
this.dataForm.unit = e;
|
||||
},
|
||||
transportTypeChange(e){
|
||||
this.dataForm.transportType = e;
|
||||
},
|
||||
advanceChange(e){
|
||||
this.dataForm.advance = e;
|
||||
},
|
||||
customerSelect(e, d) {
|
||||
const query = {
|
||||
code: d.id
|
||||
}
|
||||
request({
|
||||
url: '/api/example/ContractFile/getListByCustomer',
|
||||
method: 'post',
|
||||
data: query
|
||||
}).then((res) => {
|
||||
if(res.data.length > 0){
|
||||
//确定后 根据type 进行保存 不需要组件通讯
|
||||
this.dataForm.salesId = res.data[0].id
|
||||
this.dataForm.salesName = res.data[0].contractName
|
||||
}
|
||||
})
|
||||
},
|
||||
customerSelect2(a, b) {
|
||||
this.dataForm.supplierId = b.code;
|
||||
debugger
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
this.imageUrl = URL.createObjectURL(file.raw);
|
||||
this.dataForm.customerId = res.data.customerId;
|
||||
this.dataForm.customerName = res.data.customerName;
|
||||
this.dataForm.salesId = res.data.salesId;
|
||||
this.dataForm.salesName = res.data.salesName;
|
||||
this.dataForm.vehicleId = res.data.vehicleId;
|
||||
this.dataForm.poundDate = res.data.poundDate;
|
||||
this.dataForm.poundlistNo = res.data.poundlistNo;
|
||||
this.dataForm.tareWeight = res.data.tareWeight;
|
||||
this.dataForm.grossWeight = res.data.grossWeight;
|
||||
this.dataForm.buckleWeight = res.data.buckleWeight;
|
||||
this.dataForm.netWeight = res.data.netWeight;
|
||||
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
|
||||
},
|
||||
changePicture(a, b) {
|
||||
this.dataForm.vehiclePictures = JSON.parse(b.vehiclephotos);
|
||||
},
|
||||
continueUpload() {
|
||||
var tareWeight = this.dataForm.tareWeight;//皮重
|
||||
var grossWeight = this.dataForm.grossWeight;//毛重
|
||||
var buckleWeight = this.dataForm.buckleWeight;//扣重
|
||||
var netWeight = this.dataForm.netWeight;//净重
|
||||
if(grossWeight < tareWeight + buckleWeight + netWeight){
|
||||
this.$message({
|
||||
message: '毛重不得小于皮重+扣重+净重',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
return
|
||||
}
|
||||
if(buckleWeight >= netWeight){
|
||||
this.$message({
|
||||
message: '扣重不得大于净重',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
return
|
||||
}
|
||||
if(buckleWeight >= grossWeight){
|
||||
this.$message({
|
||||
message: '扣重不得大于毛重',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.request3()
|
||||
}
|
||||
})
|
||||
},
|
||||
// poundAI(){
|
||||
// let formData = new FormData();
|
||||
// let file = this.dataForm.poundPictures
|
||||
// formData.append('file',file);
|
||||
// request({
|
||||
// url: '/api/tradeupload/Tradeupload/poundai',
|
||||
// method: 'post',
|
||||
// data: formData
|
||||
// }).then(res => {
|
||||
// this.dataInfo(res.data)
|
||||
// this.loading = false
|
||||
// });
|
||||
// },
|
||||
clearData(data) {
|
||||
for (let key in data) {
|
||||
if (data[key] instanceof Array) {
|
||||
data[key] = [];
|
||||
} else if (data[key] instanceof Object) {
|
||||
this.clearData(data[key]);
|
||||
} else {
|
||||
data[key] = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
init(id, isDetail) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.isDetail = isDetail || false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['elForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
} else {
|
||||
this.clearData(this.dataForm)
|
||||
this.dataForm.poundDate = new Date();
|
||||
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
|
||||
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
var tareWeight = this.dataForm.tareWeight;//皮重
|
||||
var grossWeight = this.dataForm.grossWeight;//毛重
|
||||
var buckleWeight = this.dataForm.buckleWeight;//扣重
|
||||
var netWeight = this.dataForm.netWeight;//净重
|
||||
this.dataForm.isExamine = '1';
|
||||
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
|
||||
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
|
||||
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
|
||||
if(grossWeight < tareWeight + buckleWeight + netWeight){
|
||||
this.$message({
|
||||
message: '毛重不得小于皮重+扣重+净重',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
return
|
||||
}
|
||||
if(buckleWeight >= netWeight){
|
||||
this.$message({
|
||||
message: '扣重不得大于净重',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
return
|
||||
}
|
||||
if(buckleWeight >= grossWeight){
|
||||
this.$message({
|
||||
message: '扣重不得大于毛重',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.request2()
|
||||
}
|
||||
})
|
||||
},
|
||||
request2() {
|
||||
var _data = this.dataList()
|
||||
debugger
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/tradeupload/Tradeupload',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
request3() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/tradeupload/Tradeupload',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
})
|
||||
}
|
||||
this.dataForm.vehicleId = null;
|
||||
this.dataForm.vehiclePictures = null;
|
||||
this.dataForm.poundDate = null;
|
||||
this.dataForm.poundlistNo = null;
|
||||
this.dataForm.tareWeight = null;
|
||||
this.dataForm.grossWeight = null;
|
||||
this.dataForm.buckleWeight = null;
|
||||
this.dataForm.netWeight = null;
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/tradeupload/Tradeupload',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
_data.poundPictures = JSON.stringify(_data.poundPictures)
|
||||
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
|
||||
_data.originPlace = JSON.stringify(_data.originPlace)
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures)
|
||||
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
|
||||
if(_dataAll.originPlace.length > 0){
|
||||
_dataAll.originPlace = JSON.parse(_dataAll.originPlace)
|
||||
}else{
|
||||
_dataAll.originPlace = []
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
text-align: center;
|
||||
}
|
||||
.avatar {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue