20261008
This commit is contained in:
@@ -0,0 +1,950 @@
|
||||
<template>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="text-50">发布我的拍卖信息</text>
|
||||
<text class="text-gray">拍卖信息越完整,成功交易越容易</text>
|
||||
<view class="layout w-100p m-top-10">
|
||||
<view class="goods-item half flex align-center flex-wrap w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">物资分类:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="openPicker">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="cateName"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<el-checkbox label="其他分类" v-model="form.otherCate" class="mx-20"></el-checkbox>
|
||||
<u--input
|
||||
placeholder="请选择"
|
||||
v-model="form.otherCateName"
|
||||
fontSize="24rpx"
|
||||
:disabled="!form.otherCate"
|
||||
@change="setOther"
|
||||
></u--input>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">信息标题:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--input
|
||||
placeholder="一句话简介物资,如拍卖直缝钢管200吨等"
|
||||
v-model="form.title"
|
||||
fontSize="24rpx"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">采购物资详情:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--textarea
|
||||
placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
|
||||
v-model="form.desc"
|
||||
fontSize="24rpx"
|
||||
></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">拍卖实物:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u-upload
|
||||
multiple
|
||||
:fileList="files"
|
||||
@afterRead="afterRead"
|
||||
@delete="deletePic"
|
||||
width="120rpx"
|
||||
height="120rpx"
|
||||
></u-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">物资所在地:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showAddress">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="region"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">物资详细地址:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--input placeholder="请输入物资详细地址" v-model="form.addressDetail"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="goods-item half flex align-center flex-wrap mt-20 w-100p">-->
|
||||
<!-- <view class="lb">起拍数:</view>-->
|
||||
<!-- <view class="vl flex-1 p-right-20">-->
|
||||
<!-- <u--input placeholder="请选择" v-model="form.startNum"></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">起拍计价单位:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showUnit = true">
|
||||
<u--input placeholder="请输入起拍计价单位" v-model="form.unit" style="pointer-events:none"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">起拍人民币单价:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--input placeholder="请输入内容" v-model="form.startAmount"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">拍卖信息失效时间:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showExpire = true">
|
||||
<u--input placeholder="请选择" v-model="form.expiredTime" style="pointer-events:none"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="expire-tip">温馨提示:为保证信息有效性发布最长时限为1年(12个月)到期后需重新发布。</view>
|
||||
<view class="card-title m-top-30">发票要求</view>
|
||||
<view class="flex justify-start align-center m-top-30">
|
||||
<u-radio-group v-model="form.invoice" placement="row">
|
||||
<u-radio activeColor="red" :name='true' label="含税" :customStyle="{marginRight: '30px'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='false' label="不含税"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<template v-if="form.invoice">
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">开票时间:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.writeInvoiceTime" placement="column">
|
||||
<u-radio activeColor="red" :name='0' label="付款当月(限20号之后付款次月开票)"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='1' label="付款后次月"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='2' label="付款前"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">纳税人身份:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.taxType" placement="column">
|
||||
<u-radio activeColor="red" name='一般纳税人' label="一般纳税人"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='小规模公司' label="小规模公司"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='个体工商户' label="个体工商户"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">发票种类:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.invoiceType" placement="column">
|
||||
<u-radio activeColor="red" name='专用发票' label="专用发票"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='普通发票' label="普通发票"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">税率:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.taxRate" placement="column">
|
||||
<u-radio activeColor="red" v-for="(item, index) in ['13%', '9%', '6%', '4%', '3%', '1%']"
|
||||
:key="index" :name='item' :label="item"
|
||||
:customStyle="{marginBottom: '10px'}"/>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">手动填写税票要求:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="如:一般纳税人 专用发票 税率13%"
|
||||
border="surround"
|
||||
v-model="form.invoiceOther"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="card-title m-top-30">交易说明</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">报价区域:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showOfferAddress">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="offerRegion"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
<el-checkbox v-model="form.offerAddressNoLimit" @change="changeOfferAddressNoLimit">不限区域
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">付款方式:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.payMethod" placement="column">
|
||||
<!-- <u-radio activeColor="red" name='预付' label="预付N%,货到付全款"-->
|
||||
<!-- :customStyle="{marginBottom: '10px'}"></u-radio>-->
|
||||
<u-radio activeColor="red" name='预付'
|
||||
:customStyle="{marginBottom: '10px'}">
|
||||
<view class="text-25 flex justify-start items-center">
|
||||
<text>预付</text>
|
||||
<u-input v-model="form.prePayRate" :disabled="form.payMethod !== '预付'"
|
||||
:custom-style="{width: '100rpx'}"></u-input>
|
||||
<text>%,货到付全款</text>
|
||||
</view>
|
||||
</u-radio>
|
||||
<u-radio activeColor="red" name='提货付全款' label="提货付全款"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='其他付款方式描述'
|
||||
:customStyle="{marginBottom: '10px'}">
|
||||
<view class="flex justify-start items-start flex-col w-100p">
|
||||
<text style="color: rgb(96, 98, 102);
|
||||
font-size: 15px;
|
||||
line-height: 15px;">其他付款方式描述
|
||||
</text>
|
||||
<u--textarea v-model="form.otherPayMethodDesc" :disabled="form.payMethod !== '其他付款方式描述'"
|
||||
placeholder="请输入内容" :custom-style="{width: '400rpx'}"/>
|
||||
</view>
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="group flex align-center m-top-30" v-if="form.payMethod === '预付'">-->
|
||||
<!-- <view class="lb m-right-20">预付(%):</view>-->
|
||||
<!-- <view class="vl flex-1">-->
|
||||
<!-- <u--input-->
|
||||
<!-- placeholder="请输入内容"-->
|
||||
<!-- v-model="form.prePayRate"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<view class="card-title m-top-30">合同条款</view>
|
||||
<view class="flex justify-start align-center m-top-30">
|
||||
<u-radio-group v-model="form.signMethod" placement="column">
|
||||
<u-radio activeColor="red" :name='0' label="线上签约-标准合同"
|
||||
:customStyle="{marginBottom: '30rpx'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='2' label="线上签约-双方协商合同"
|
||||
:customStyle="{marginBottom: '30rpx'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='1' label="线下签约"
|
||||
:customStyle="{marginBottom: '30rpx'}"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<template v-if="form.signMethod === 2">
|
||||
<view class="card-title m-top-30">合同附件</view>
|
||||
<u-upload
|
||||
accept="file"
|
||||
:fileList="contractAttachment"
|
||||
@afterRead="afterReadAttachment($event, 'contractAttachment')"
|
||||
@delete="deletePicAttachment($event, 'contractAttachment')"
|
||||
name="contractAttachment"
|
||||
multiple
|
||||
:maxCount="10"
|
||||
></u-upload>
|
||||
</template>
|
||||
<view v-if="form.signMethod === 0" class="text-25" style="line-height: 32rpx">
|
||||
<view v-if="form.signMethod === 0" class="mb-15">补充条款</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">违约责任:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
1.
|
||||
乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;
|
||||
2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">解决纠纷的方法:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工费和获取证据产生费用等其他相关费用。
|
||||
2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">不可抗力:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">其他:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="lb m-right-20">销售方补充条款:</view>
|
||||
<view class="vl w-100p">
|
||||
<u--textarea
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplementary"
|
||||
></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-title m-top-30">供货商信息</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司信息' : '个人信息' }}:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplier.companyName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司联系方式' : '个人联系方式' }}:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplier.contract"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">联系人:</view>
|
||||
<view class="vl flex-1" @click="showContactPicker = true">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
readonly
|
||||
placeholder="点击选择联系人"
|
||||
v-model="form.supplier.managerName"
|
||||
suffixIcon="arrow-right"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">联系方式:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
disabled
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplier.managerContract"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
|
||||
<el-radio label="是" v-model="checked">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio label="否" v-model="checked">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">是否加急({{ urgentAmount }}元/次):</text>
|
||||
<el-radio :label="true" v-model="form.isUrgent">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio :label="false" v-model="form.isUrgent">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
|
||||
<view class="flex justify-start items-center text-25">
|
||||
<el-checkbox :value="agree" active-color="#A92924" @change="handleAgreementCheck">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-30 m-a w-100p">
|
||||
<view class="flex-1 mx-15">
|
||||
<u-button type="primary" @click="save" plain="">暂存</u-button>
|
||||
</view>
|
||||
<view class="flex-1 mx-15">
|
||||
<u-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker v-if="showPicker" :show="showPicker" :columns="[cateData, cateData[cateDataIndex].children]"
|
||||
keyName="name" @change="changeCate"
|
||||
@cancel="showPicker = false" @close="showPicker = false" closeOnClickOverlay
|
||||
@confirm="confirmCate"></u-picker>
|
||||
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
||||
<AddressSelect ref="OfferAddressSelect" @confirm="offerRegionConfirm"/>
|
||||
<u-picker :show="showUnit" :columns="[unitList]"
|
||||
@cancel="showUnit = false" @close="showUnit = false" closeOnClickOverlay
|
||||
@confirm="confirmUnit"></u-picker>
|
||||
<u-datetime-picker :show="showExpire" v-model="expireTime" mode="date" @cancel="showExpire = false"
|
||||
:minDate="minDate" :maxDate="maxDate"
|
||||
@confirm="handConfirmDate"></u-datetime-picker>
|
||||
<u-picker :show="showContactPicker" :columns="[contactList]" keyName="name"
|
||||
@cancel="showContactPicker = false" @close="showContactPicker = false" closeOnClickOverlay
|
||||
@confirm="confirmContact"></u-picker>
|
||||
<agreement ref="agreementRef" @read-complete="onAgreementReadComplete"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import AddressSelect from "@/components/AddressSelect.vue";
|
||||
import dayjs from "dayjs";
|
||||
import md5 from "js-md5";
|
||||
import Agreement from "@/pages/junk/agreement.vue";
|
||||
|
||||
export default {
|
||||
name: "type_0",
|
||||
components: {Agreement, AddressSelect},
|
||||
props: {
|
||||
urgentAmount: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
remainOldNum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
commonContractUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
contactList: {
|
||||
type: Array,
|
||||
default: ''
|
||||
},
|
||||
unitList: {
|
||||
type: Array,
|
||||
default: ''
|
||||
},
|
||||
user: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
agree: false,
|
||||
agreementReadCompleted: false,
|
||||
allChildCate: [],
|
||||
cateData: [],
|
||||
cateDataIndex: 0,
|
||||
form: {
|
||||
type: 0,
|
||||
category: 0,
|
||||
files: [],
|
||||
otherCate: false,
|
||||
otherCateName: '',
|
||||
title: '',
|
||||
desc: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
startNum: '',
|
||||
unit: '吨',
|
||||
startAmount: '',
|
||||
expiredTime: '',
|
||||
offerAddressRegion: {},
|
||||
offerAddressNoLimit: false,
|
||||
payMethod: '预付',
|
||||
prePayRate: '',
|
||||
otherPayMethodDesc: '',
|
||||
signMethod: 0,
|
||||
buyer: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
supplier: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
contractAttachment: [],
|
||||
isUrgent: false,
|
||||
supplementary: '',
|
||||
invoice: false,
|
||||
writeInvoiceTime: 0,
|
||||
taxType: '一般纳税人',
|
||||
invoiceType: '专用发票',
|
||||
taxRate: '13%',
|
||||
invoiceOther: '',
|
||||
},
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
offerProvinceIndex: null,
|
||||
offerCityIndex: null,
|
||||
offerAreaIndex: null,
|
||||
checked: '否',
|
||||
showPicker: false,
|
||||
cateName: '',
|
||||
region: '',
|
||||
offerRegion: '',
|
||||
showUnit: false,
|
||||
showExpire: false,
|
||||
expireTime: '',
|
||||
showContactPicker: false,
|
||||
minDate: Number(new Date()),
|
||||
maxDate: dayjs().add(1, 'year').valueOf(),
|
||||
contractAttachment: [],
|
||||
files: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showAddress() {
|
||||
this.$refs.AddressSelect.open(this.form.addressRegion);
|
||||
},
|
||||
regionConfirm({province, city, area}) {
|
||||
this.form.addressRegion = {province, city, area}
|
||||
this.region = `${province.name} ${city.name} ${area.name}`
|
||||
},
|
||||
showOfferAddress() {
|
||||
this.$refs.OfferAddressSelect.open(this.form.offerAddressRegion);
|
||||
},
|
||||
offerRegionConfirm({province, city, area}) {
|
||||
this.form.offerAddressRegion = {province, city, area}
|
||||
this.offerRegion = `${province.name} ${city.name} ${area.name}`
|
||||
},
|
||||
async publish() {
|
||||
if (this.remainOldNum === 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您的旧货发布次数已用完,是否立即购买?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${data}`
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.form.addressRegion) return this.$message({
|
||||
message: "请选择完整的物资所在地",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.addressDetail) return this.$message({
|
||||
message: "请填写详细物资所在地",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.title) return this.$message({
|
||||
message: "请填写标题",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.otherCate) {
|
||||
if (!this.form.category) return this.$message({
|
||||
message: "请选择分类",
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
if (!this.form.otherCateName) return this.$message({
|
||||
message: "请输入其他分类",
|
||||
type: 'warning'
|
||||
})
|
||||
this.form.category = ['', this.form.otherCateName]
|
||||
}
|
||||
if (!this.form.expiredTime) return this.$message({
|
||||
message: "请选择失效时间",
|
||||
type: 'warning'
|
||||
})
|
||||
if (dayjs(this.form.expiredTime).valueOf() > this.maxDate) return this.$message({
|
||||
message: "为保证信息有效性发布最长时限为1年(12个月)",
|
||||
type: 'warning'
|
||||
})
|
||||
if (this.form.payMethod === '预付' && String(this.form.prePayRate).trim() === '') return this.$message({
|
||||
message: "请填写预付比例",
|
||||
type: 'warning'
|
||||
})
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/old/kh/add',
|
||||
data: this.form
|
||||
})
|
||||
localStorage.removeItem("old_0")
|
||||
this.$message({
|
||||
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.form.isUrgent) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${res.data}`
|
||||
})
|
||||
} else {
|
||||
vk.redirectTo({url: '/pages/junk/junk'});
|
||||
}
|
||||
}, 1500)
|
||||
},
|
||||
handleAgreementCheck(value) {
|
||||
if (!value) {
|
||||
this.agree = false
|
||||
return
|
||||
}
|
||||
if (!this.agreementReadCompleted) {
|
||||
this.agree = false
|
||||
uni.showToast({
|
||||
title: '请先查看《金久信旧货交易协议》5秒以上',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.agree = true
|
||||
},
|
||||
onAgreementReadComplete() {
|
||||
this.agreementReadCompleted = true
|
||||
},
|
||||
showAgreement() {
|
||||
// this.$confirm(this.agreement, '金久信旧货交易协议', {
|
||||
// cancelButtonText: '关闭',
|
||||
// showConfirmButton: false,
|
||||
// dangerouslyUseHTMLString: true,
|
||||
// })
|
||||
this.$refs.agreementRef.open()
|
||||
},
|
||||
openDownload() {
|
||||
window.location.href = this.commonContractUrl
|
||||
// window.open(this.commonContractUrl)
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
confirmCate({value}) {
|
||||
this.form.category = value.map(i => i.name)
|
||||
this.cateName = `${value[0].name} / ${value[1].name}`
|
||||
this.showPicker = false
|
||||
},
|
||||
changeCate({columnIndex, index}) {
|
||||
if (columnIndex === 0) {
|
||||
this.cateDataIndex = index
|
||||
}
|
||||
},
|
||||
confirmUnit({value}) {
|
||||
this.form.unit = value[0]
|
||||
this.showUnit = false
|
||||
},
|
||||
afterRead({file}) {
|
||||
file.forEach(item => {
|
||||
const suffix = item.name.split('.').pop()
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.form.files.push(res.fileList[0].tempFileURL)
|
||||
this.files.push({url: res.fileList[0].tempFileURL})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
deletePic({index}) {
|
||||
this.form.files.splice(index, 1)
|
||||
},
|
||||
handConfirmDate({value}) {
|
||||
this.form.expiredTime = dayjs(value).format('YYYY-MM-DD')
|
||||
this.showExpire = false
|
||||
},
|
||||
confirmContact({value}) {
|
||||
this.form.supplier.managerName = value[0].name
|
||||
this.form.supplier.managerContract = value[0].phone
|
||||
this.showContactPicker = false
|
||||
},
|
||||
changeOfferAddressNoLimit(val) {
|
||||
if (val) {
|
||||
this.form.offerAddressRegion = {}
|
||||
this.offerRegion = ''
|
||||
this.offerProvinceIndex = this.offerCityIndex = this.offerAreaIndex = null
|
||||
}
|
||||
},
|
||||
afterReadAttachment({file}, field) {
|
||||
for (let i = 0; i < file.length; i++) {
|
||||
const item = file[i]
|
||||
const suffix = item.name.split('.').pop()
|
||||
if (field === 'files' || field === 'contractAttachment') {
|
||||
if (item.type !== 'application/pdf') {
|
||||
uni.showToast({
|
||||
title: '请上传PDF文件',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this[field].push({url: res.fileList[0].tempFileURL})
|
||||
this.form[field].push(res.fileList[0].tempFileURL)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
deletePicAttachment({index}, field) {
|
||||
this[field].splice(index, 1)
|
||||
this.form[field].splice(index, 1)
|
||||
},
|
||||
save() {
|
||||
localStorage.setItem("old_0", JSON.stringify({
|
||||
form: this.form,
|
||||
cateName: this.cateName,
|
||||
files: this.files,
|
||||
region: this.region,
|
||||
}))
|
||||
this.$message({
|
||||
message: "已保存",
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
setOther(){
|
||||
this.cateName = ''
|
||||
},
|
||||
openPicker(){
|
||||
if(this.form.otherCate) return
|
||||
this.showPicker = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {type: 0},
|
||||
success: (data) => {
|
||||
this.cateData = data.rows.map(item => {
|
||||
item.children.forEach(child => {
|
||||
delete child.children
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
if (this.user.accountType === 2) {
|
||||
this.form.supplier.companyName = this.user.company.companyName
|
||||
this.form.supplier.contract = this.user.company.mobile
|
||||
} else {
|
||||
this.form.supplier.companyName = this.user.person.personName
|
||||
this.form.supplier.contract = this.user.person.mobile
|
||||
}
|
||||
if (!!localStorage.getItem("old_0")) {
|
||||
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const savedData = JSON.parse(localStorage.getItem("old_0"))
|
||||
this.form = savedData.form
|
||||
this.cateName = savedData.cateName
|
||||
this.files = savedData.files
|
||||
this.offerRegion = savedData.offerRegion
|
||||
this.region = savedData.region
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.layout-header {
|
||||
margin: 0rpx 30rpx;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid rgba(169, 41, 36, 0.34);
|
||||
|
||||
.big {
|
||||
font-size: 32rpx;
|
||||
line-height: 48rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #9a9a9a;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ptb {
|
||||
margin-right: 20rpx;
|
||||
padding: 6rpx 14rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
border: 1px solid #f2f2f2;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #ffffff;
|
||||
border-color: #A92924;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.public-btn {
|
||||
width: 95%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.layout-publish {
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.tag-title {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #000000;
|
||||
|
||||
.limit {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.tag-box {
|
||||
padding: 20rpx 0;
|
||||
|
||||
.item {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.lb, .fix {
|
||||
position: relative;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.lbx {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.download {
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.need::before {
|
||||
position: absolute;
|
||||
left: -16rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -12rpx;
|
||||
content: '*';
|
||||
color: #A92924;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -14rpx;
|
||||
content: '';
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.template-tab {
|
||||
.ttb {
|
||||
margin-right: 30rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
border: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.template-content {
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
padding: 18rpx 0;
|
||||
}
|
||||
|
||||
.expire-tip {
|
||||
padding: 0 20rpx 18rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
margin-left: 0;
|
||||
width: 180rpx;
|
||||
height: 60rpx;
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,995 @@
|
||||
<template>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="text-50">发布我的采购信息</text>
|
||||
<text class="text-gray">采购信息越完整,成功交易越容易</text>
|
||||
<view class="layout w-100p m-top-10">
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">信息失效时间:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showExpire = true">
|
||||
<u--input placeholder="请选择" v-model="form.expiredTime" style="pointer-events:none"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="expire-tip">温馨提示:为保证信息有效性发布最长时限为1年(12个月)到期后需重新发布。</view>
|
||||
<view class="goods-item half flex align-center flex-wrap w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">物资分类:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="openPicker">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="cateName"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<el-checkbox label="其他分类" v-model="form.otherCate" class="mx-20"></el-checkbox>
|
||||
<u--input
|
||||
placeholder="请选择"
|
||||
v-model="form.otherCateName"
|
||||
fontSize="24rpx"
|
||||
:disabled="!form.otherCate"
|
||||
@change="setOther"
|
||||
></u--input>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">信息标题:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--input
|
||||
placeholder="一句话简介物资,如拍卖直缝钢管200吨等"
|
||||
v-model="form.title"
|
||||
fontSize="24rpx"
|
||||
></u--input>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">采购物资详情:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--textarea
|
||||
placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
|
||||
v-model="form.desc"
|
||||
fontSize="24rpx"
|
||||
></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="goods-item half flex align-center flex-wrap mt-20 w-100p">-->
|
||||
<!-- <view class="lb">物资装货所在地:</view>-->
|
||||
<!-- <view class="vl flex-1 p-right-20" @click="showAddress">-->
|
||||
<!-- <u--input-->
|
||||
<!-- style="pointer-events:none"-->
|
||||
<!-- placeholder="请选择"-->
|
||||
<!-- v-model="region"-->
|
||||
<!-- fontSize="24rpx"-->
|
||||
<!-- suffixIcon="arrow-down-fill"-->
|
||||
<!-- suffixIconStyle="font-size: 10px;color: #d5d5d5"-->
|
||||
<!-- :disabled="true"-->
|
||||
<!-- disabledColor="#fff"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="goods-item half flex align-center flex-wrap mt-20 w-100p">-->
|
||||
<!-- <view class="lb">物资装货详细地址:</view>-->
|
||||
<!-- <view class="vl flex-1 p-right-20">-->
|
||||
<!-- <u--input placeholder="请选择" v-model="form.addressDetail"></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">物资交货所在地:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="deliverShowAddress">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="deliverRegion"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">物资交货详细地址:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--input placeholder="请选择" v-model="form.deliverAddressDetail"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-title m-top-30">税票要求</view>
|
||||
<view class="flex justify-start align-center m-top-30">
|
||||
<u-radio-group
|
||||
v-model="form.invoice"
|
||||
placement="row"
|
||||
>
|
||||
<u-radio activeColor="red" :name='true' label="含税" :customStyle="{marginRight: '30px'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='false' label="不含税"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<template v-if="form.invoice">
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">开票时间:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.writeInvoiceTime" placement="column">
|
||||
<u-radio activeColor="red" :name='0' label="付款当月(限20号之后付款次月开票)"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='1' label="付款后次月"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='2' label="付款前"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">纳税人身份:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.taxType" placement="column">
|
||||
<u-radio activeColor="red" name='一般纳税人' label="一般纳税人"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='小规模公司' label="小规模公司"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='个体工商户' label="个体工商户"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">发票种类:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.invoiceType" placement="column">
|
||||
<u-radio activeColor="red" name='专用发票' label="专用发票"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='普通发票' label="普通发票"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">税率:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.taxRate" placement="column">
|
||||
<u-radio activeColor="red" v-for="(item, index) in ['13%', '9%', '6%', '4%', '3%', '1%']"
|
||||
:key="index" :name='item' :label="item"
|
||||
:customStyle="{marginBottom: '10px'}"/>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">手动填写税票要求:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="如:一般纳税人 专用发票 税率13%"
|
||||
border="surround"
|
||||
v-model="form.invoiceOther"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="card-title m-top-30">交易说明</view>
|
||||
<!-- <view class="group flex align-center m-top-30">-->
|
||||
<!-- <view class="lb m-right-20">报价明细:</view>-->
|
||||
<!-- <view class="vl flex-1">-->
|
||||
<!-- <u--input-->
|
||||
<!-- placeholder="请输入内容"-->
|
||||
<!-- border="surround"-->
|
||||
<!-- v-model="form.invoiceDetail"-->
|
||||
<!-- ></u--input>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">报价区域:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="offerShowAddress">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="offerRegion"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
<el-checkbox v-model="form.offerAddressNoLimit" @change="changeOfferAddressNoLimit">不限区域
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">报价截止时间:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showOfferExpire = true">
|
||||
<u--input placeholder="请选择" v-model="form.offerExpiredTime" style="pointer-events:none"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex m-top-30">
|
||||
<view class="lb m-right-20">付款方式:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group v-model="form.payMethod" placement="column">
|
||||
<!-- <u-radio activeColor="red" name='预付' label="预付N%,货到付全款"-->
|
||||
<!-- :customStyle="{marginBottom: '10px'}"></u-radio>-->
|
||||
<u-radio activeColor="red" name='预付'
|
||||
:customStyle="{marginBottom: '10px'}">
|
||||
<view class="text-25 flex justify-start items-center">
|
||||
<text>预付</text>
|
||||
<u-input v-model="form.prePayRate" :disabled="form.payMethod !== '预付'"
|
||||
:custom-style="{width: '100rpx'}"></u-input>
|
||||
<text>%,货到付全款</text>
|
||||
</view>
|
||||
</u-radio>
|
||||
<u-radio activeColor="red" name='提货付全款' label="提货付全款"
|
||||
:customStyle="{marginBottom: '10px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='其他付款方式描述'
|
||||
:customStyle="{marginBottom: '10px'}">
|
||||
<view class="flex justify-start items-start flex-col w-100p">
|
||||
<text style="color: rgb(96, 98, 102);
|
||||
font-size: 15px;
|
||||
line-height: 15px;">其他付款方式描述
|
||||
</text>
|
||||
<u--textarea v-model="form.otherPayMethodDesc" :disabled="form.payMethod !== '其他付款方式描述'"
|
||||
placeholder="请输入内容" :custom-style="{width: '400rpx'}"/>
|
||||
</view>
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start align-center m-top-30">
|
||||
<view class="lb m-right-20">报价形式:</view>
|
||||
<view class="vl flex-1">
|
||||
<u-radio-group
|
||||
v-model="form.offerType"
|
||||
placement="row"
|
||||
>
|
||||
<u-radio activeColor="red" name='整单报价' label="整单报价"
|
||||
:customStyle="{marginRight: '30px'}"></u-radio>
|
||||
<u-radio activeColor="red" name='可分项报价' label="可分项报价"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-title m-top-30">合同条款</view>
|
||||
<view class="flex justify-start align-center m-top-30">
|
||||
<u-radio-group v-model="form.signMethod" placement="column">
|
||||
<u-radio activeColor="red" :name='0' label="线上签约-标准合同"
|
||||
:customStyle="{marginBottom: '30rpx'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='2' label="线上签约-双方协商合同"
|
||||
:customStyle="{marginBottom: '30rpx'}"></u-radio>
|
||||
<u-radio activeColor="red" :name='1' label="线下签约"
|
||||
:customStyle="{marginBottom: '30rpx'}"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<template v-if="form.signMethod === 2">
|
||||
<view class="card-title m-top-30">合同附件</view>
|
||||
<u-upload
|
||||
accept="file"
|
||||
:fileList="contractAttachment"
|
||||
@afterRead="afterReadAttachment($event, 'contractAttachment')"
|
||||
@delete="deletePicAttachment($event, 'contractAttachment')"
|
||||
name="contractAttachment"
|
||||
multiple
|
||||
:maxCount="10"
|
||||
></u-upload>
|
||||
</template>
|
||||
<view v-if="form.signMethod === 0" class="text-25" style="line-height: 32rpx">
|
||||
<view v-if="form.signMethod === 0" class="mb-15">补充条款</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">违约责任:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
1.
|
||||
乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;
|
||||
2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">解决纠纷的方法:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工费和获取证据产生费用等其他相关费用。
|
||||
2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">不可抗力:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="m-10">其他:</view>
|
||||
<view class="pl-20 flex-1 py-20">
|
||||
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-start items-start flex-col">
|
||||
<view class="lb m-right-20">采购方补充条款:</view>
|
||||
<view class="vl w-100p">
|
||||
<u--textarea
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplementary"
|
||||
></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-title m-top-30">采购商信息</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">采购商:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.buyer.companyName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">联系方式:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.buyer.contract"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">联系人:</view>
|
||||
<view class="vl flex-1" @click="showContactPicker = true">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
readonly
|
||||
placeholder="点击选择联系人"
|
||||
v-model="form.buyer.managerName"
|
||||
suffixIcon="arrow-right"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">联系方式:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
disabled
|
||||
placeholder="请输入内容"
|
||||
v-model="form.buyer.managerContract"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
|
||||
<el-radio label="是" v-model="checked">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio label="否" v-model="checked">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">是否加急({{ urgentAmount }}元/次):</text>
|
||||
<el-radio :label="true" v-model="form.isUrgent">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio :label="false" v-model="form.isUrgent">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<el-checkbox :value="agree" active-color="#A92924" @change="handleAgreementCheck">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-30 m-a w-100p">
|
||||
<view class="flex-1 mx-15">
|
||||
<u-button type="primary" @click="save" plain="">暂存</u-button>
|
||||
</view>
|
||||
<view class="flex-1 mx-15">
|
||||
<u-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker v-if="showPicker" :show="showPicker" :columns="[cateData, cateData[cateDataIndex].children]"
|
||||
keyName="name" @change="changeCate"
|
||||
@cancel="showPicker = false" @close="showPicker = false" closeOnClickOverlay
|
||||
@confirm="confirmCate"></u-picker>
|
||||
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
||||
<AddressSelect ref="DeliverAddressSelect" @confirm="deliverRegionConfirm"/>
|
||||
<AddressSelect ref="OfferAddressSelect" @confirm="offerRegionConfirm"/>
|
||||
<u-picker :show="showUnit" :columns="[unitList]"
|
||||
@cancel="showUnit = false" @close="showUnit = false" closeOnClickOverlay
|
||||
@confirm="confirmUnit"></u-picker>
|
||||
<u-datetime-picker :show="showExpire" v-model="expireTime" mode="date" @cancel="showExpire = false"
|
||||
:minDate="minDate" :maxDate="maxDate"
|
||||
@confirm="handConfirmDate"></u-datetime-picker>
|
||||
<u-datetime-picker :show="showOfferExpire" v-model="offerExpiredTime" mode="date"
|
||||
@cancel="showOfferExpire = false" :minDate="minDate"
|
||||
@confirm="handOfferConfirmDate"></u-datetime-picker>
|
||||
<u-picker :show="showContactPicker" :columns="[contactList]" keyName="name"
|
||||
@cancel="showContactPicker = false" @close="showContactPicker = false" closeOnClickOverlay
|
||||
@confirm="confirmContact"></u-picker>
|
||||
<agreement ref="agreementRef" @read-complete="onAgreementReadComplete"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import AddressSelect from "@/components/AddressSelect.vue";
|
||||
import dayjs from "dayjs";
|
||||
import {INVOICE_TYPE, WRITE_INVOICE_TIME} from "@/util";
|
||||
import md5 from "js-md5";
|
||||
import Agreement from "@/pages/junk/agreement.vue";
|
||||
|
||||
export default {
|
||||
name: "type_0",
|
||||
components: {Agreement, AddressSelect},
|
||||
props: {
|
||||
urgentAmount: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
remainOldNum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
agreement: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
commonContractUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
contactList: {
|
||||
type: Array,
|
||||
default: ''
|
||||
},
|
||||
user: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
agree: false,
|
||||
agreementReadCompleted: false,
|
||||
unitList: ['吨', '万吨'],
|
||||
allChildCate: [],
|
||||
cateData: [],
|
||||
cateDataIndex: 0,
|
||||
form: {
|
||||
otherCate: false,
|
||||
otherCateName: '',
|
||||
type: 1,
|
||||
category: 0,
|
||||
files: [],
|
||||
title: '',
|
||||
desc: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
deliverAddressRegion: {},
|
||||
deliverAddressDetail: '',
|
||||
invoiceDetail: '',
|
||||
expiredTime: '',
|
||||
offerExpiredTime: '',
|
||||
offerAddressRegion: {},
|
||||
offerAddressNoLimit: false,
|
||||
payMethod: '预付',
|
||||
offerType: '整单报价',
|
||||
prePayRate: '',
|
||||
otherPayMethodDesc: '',
|
||||
signMethod: 0,
|
||||
buyer: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
supplier: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
contractAttachment: [],
|
||||
isUrgent: false,
|
||||
supplementary: '',
|
||||
invoice: false,
|
||||
writeInvoiceTime: 0,
|
||||
taxType: '一般纳税人',
|
||||
invoiceType: '专用发票',
|
||||
taxRate: '13%',
|
||||
invoiceOther: '',
|
||||
},
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
offerProvinceIndex: null,
|
||||
offerCityIndex: null,
|
||||
offerAreaIndex: null,
|
||||
checked: '否',
|
||||
showPicker: false,
|
||||
cateName: '',
|
||||
region: '',
|
||||
deliverRegion: '',
|
||||
offerRegion: '',
|
||||
showUnit: false,
|
||||
showExpire: false,
|
||||
showOfferExpire: false,
|
||||
expireTime: '',
|
||||
offerExpiredTime: '',
|
||||
showContactPicker: false,
|
||||
minDate: Number(new Date()),
|
||||
maxDate: dayjs().add(1, 'year').valueOf()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
INVOICE_TYPE() {
|
||||
return INVOICE_TYPE
|
||||
},
|
||||
WRITE_INVOICE_TIME() {
|
||||
return WRITE_INVOICE_TIME
|
||||
},
|
||||
showAddress() {
|
||||
this.$refs.AddressSelect.open(this.form.addressRegion);
|
||||
},
|
||||
regionConfirm({province, city, area}) {
|
||||
this.form.addressRegion = {province, city, area}
|
||||
this.region = `${province.name} ${city.name} ${area.name}`
|
||||
},
|
||||
deliverShowAddress() {
|
||||
this.$refs.DeliverAddressSelect.open(this.form.deliverAddressRegion);
|
||||
},
|
||||
deliverRegionConfirm({province, city, area}) {
|
||||
this.form.deliverAddressRegion = {province, city, area}
|
||||
this.deliverRegion = `${province.name} ${city.name} ${area.name}`
|
||||
},
|
||||
offerShowAddress() {
|
||||
this.$refs.OfferAddressSelect.open(this.form.offerAddressRegion);
|
||||
},
|
||||
offerRegionConfirm({province, city, area}) {
|
||||
this.form.offerAddressRegion = {province, city, area}
|
||||
this.offerRegion = `${province.name} ${city.name} ${area.name}`
|
||||
},
|
||||
async publish() {
|
||||
if (this.remainOldNum === 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您的旧货发布次数已用完,是否立即购买?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${data}`
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.form.deliverAddressRegion) return this.$message({
|
||||
message: "请选择完整的物资所在地",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.deliverAddressDetail) return this.$message({
|
||||
message: "请填写详细物资所在地",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.title) return this.$message({
|
||||
message: "请填写标题",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.otherCate) {
|
||||
if (!this.form.category) return this.$message({
|
||||
message: "请选择分类",
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
if (!this.form.otherCateName) return this.$message({
|
||||
message: "请输入其他分类",
|
||||
type: 'warning'
|
||||
})
|
||||
this.form.category = ['', this.form.otherCateName]
|
||||
}
|
||||
if (!this.form.expiredTime) return this.$message({
|
||||
message: "请选择失效时间",
|
||||
type: 'warning'
|
||||
})
|
||||
if (dayjs(this.form.expiredTime).valueOf() > this.maxDate) return this.$message({
|
||||
message: "为保证信息有效性发布最长时限为1年(12个月)",
|
||||
type: 'warning'
|
||||
})
|
||||
if (this.form.payMethod === '预付' && String(this.form.prePayRate).trim() === '') return this.$message({
|
||||
message: "请填写预付比例",
|
||||
type: 'warning'
|
||||
})
|
||||
|
||||
this.form.files = this.form.files.map(i => i.url)
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/old/kh/add',
|
||||
data: this.form
|
||||
})
|
||||
localStorage.removeItem("old_1")
|
||||
this.$message({
|
||||
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.form.isUrgent) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${res.data}`
|
||||
})
|
||||
} else {
|
||||
vk.redirectTo({url: '/pages/junk/junk'});
|
||||
}
|
||||
}, 1500)
|
||||
},
|
||||
handleAgreementCheck(value) {
|
||||
if (!value) {
|
||||
this.agree = false
|
||||
return
|
||||
}
|
||||
if (!this.agreementReadCompleted) {
|
||||
this.agree = false
|
||||
uni.showToast({
|
||||
title: '请先查看《金久信旧货交易协议》5秒以上',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.agree = true
|
||||
},
|
||||
onAgreementReadComplete() {
|
||||
this.agreementReadCompleted = true
|
||||
},
|
||||
showAgreement() {
|
||||
|
||||
// this.$confirm(this.agreement, '金久信旧货交易协议', {
|
||||
// cancelButtonText: '关闭',
|
||||
// showConfirmButton: false,
|
||||
// dangerouslyUseHTMLString: true,
|
||||
// })
|
||||
this.$refs.agreementRef.open()
|
||||
},
|
||||
openDownload() {
|
||||
// window.open(this.commonContractUrl)
|
||||
window.location.href = this.commonContractUrl
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
confirmCate({value}) {
|
||||
this.form.category = value.map(i => i.name)
|
||||
this.cateName = `${value[0].name}${value[1].name}`
|
||||
this.showPicker = false
|
||||
},
|
||||
confirmUnit({value}) {
|
||||
this.form.unit = value
|
||||
this.showUnit = false
|
||||
},
|
||||
afterRead({file}) {
|
||||
file.forEach(item => {
|
||||
const suffix = item.name.split('.').pop()
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.form.files.push({url: res.fileList[0].tempFileURL})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
deletePic({index}) {
|
||||
this.form.files.splice(index, 1)
|
||||
},
|
||||
handConfirmDate({value}) {
|
||||
this.form.expiredTime = dayjs(value).format('YYYY-MM-DD')
|
||||
this.showExpire = false
|
||||
},
|
||||
handOfferConfirmDate({value}) {
|
||||
this.form.offerExpiredTime = dayjs(value).format('YYYY-MM-DD')
|
||||
this.showOfferExpire = false
|
||||
},
|
||||
confirmContact({value}) {
|
||||
this.form.buyer.managerName = value[0].name
|
||||
this.form.buyer.managerContract = value[0].phone
|
||||
this.showContactPicker = false
|
||||
},
|
||||
changeOfferAddressNoLimit(val) {
|
||||
if (val) {
|
||||
this.form.offerAddressRegion = {}
|
||||
this.offerRegion = ''
|
||||
this.offerProvinceIndex = this.offerCityIndex = this.offerAreaIndex = null
|
||||
}
|
||||
},
|
||||
changeCate({columnIndex, index}) {
|
||||
if (columnIndex === 0) {
|
||||
this.cateDataIndex = index
|
||||
}
|
||||
},
|
||||
save() {
|
||||
localStorage.setItem("old_1", JSON.stringify({
|
||||
form: this.form,
|
||||
cateName: this.cateName,
|
||||
files: this.files,
|
||||
region: this.region,
|
||||
deliverRegion: this.deliverRegion,
|
||||
offerRegion: this.offerRegion,
|
||||
}))
|
||||
this.$message({
|
||||
message: "已保存",
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
afterReadAttachment({file}, field) {
|
||||
for (let i = 0; i < file.length; i++) {
|
||||
const item = file[i]
|
||||
const suffix = item.name.split('.').pop()
|
||||
if (field === 'files' || field === 'contractAttachment') {
|
||||
if (item.type !== 'application/pdf') {
|
||||
uni.showToast({
|
||||
title: '请上传PDF文件',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this[field].push({url: res.fileList[0].tempFileURL})
|
||||
this.form[field].push(res.fileList[0].tempFileURL)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
deletePicAttachment({index}, field) {
|
||||
this[field].splice(index, 1)
|
||||
this.form[field].splice(index, 1)
|
||||
},
|
||||
setOther() {
|
||||
this.cateName = ''
|
||||
},
|
||||
openPicker() {
|
||||
if (this.form.otherCate) return
|
||||
this.showPicker = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {type: 1},
|
||||
success: (data) => {
|
||||
this.cateData = data.rows.map(item => {
|
||||
item.children.forEach(child => {
|
||||
delete child.children
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
if (this.user.accountType === 2) {
|
||||
this.form.buyer.companyName = this.user.company.companyName
|
||||
this.form.buyer.contract = this.user.company.mobile
|
||||
} else {
|
||||
this.form.buyer.companyName = this.user.person.personName
|
||||
this.form.buyer.contract = this.user.person.mobile
|
||||
}
|
||||
if (!!localStorage.getItem("old_1")) {
|
||||
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const savedData = JSON.parse(localStorage.getItem("old_1"))
|
||||
this.form = savedData.form
|
||||
this.cateName = savedData.cateName
|
||||
this.files = savedData.files
|
||||
this.deliverRegion = savedData.deliverRegion
|
||||
this.offerRegion = savedData.offerRegion
|
||||
this.region = savedData.region
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.layout-header {
|
||||
margin: 0rpx 30rpx;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid rgba(169, 41, 36, 0.34);
|
||||
|
||||
.big {
|
||||
font-size: 32rpx;
|
||||
line-height: 48rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #9a9a9a;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ptb {
|
||||
margin-right: 20rpx;
|
||||
padding: 6rpx 14rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
border: 1px solid #f2f2f2;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #ffffff;
|
||||
border-color: #A92924;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.public-btn {
|
||||
width: 95%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.layout-publish {
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.tag-title {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #000000;
|
||||
|
||||
.limit {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.tag-box {
|
||||
padding: 20rpx 0;
|
||||
|
||||
.item {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.lb, .fix {
|
||||
position: relative;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.lbx {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.download {
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.need::before {
|
||||
position: absolute;
|
||||
left: -16rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -12rpx;
|
||||
content: '*';
|
||||
color: #A92924;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -14rpx;
|
||||
content: '';
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.template-tab {
|
||||
.ttb {
|
||||
margin-right: 30rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
border: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.template-content {
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
padding: 18rpx 0;
|
||||
}
|
||||
|
||||
.expire-tip {
|
||||
padding: 0 20rpx 18rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
margin-left: 0;
|
||||
width: 180rpx;
|
||||
height: 60rpx;
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,683 @@
|
||||
<template>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="text-50">发布我的回收信息</text>
|
||||
<text class="text-gray">回收信息越完整,成功交易越容易</text>
|
||||
<view class="layout w-100p m-top-10">
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">信息失效时间:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showExpire = true">
|
||||
<u--input placeholder="请选择" v-model="form.expiredTime" style="pointer-events:none"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="expire-tip">温馨提示:为保证信息有效性发布最长时限为1年(12个月)到期后需重新发布。</view>
|
||||
<view class="goods-item half flex align-center flex-wrap w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">物资分类:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="openPicker">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="cateName"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<el-checkbox label="其他分类" v-model="form.otherCate" class="mx-20"></el-checkbox>
|
||||
<u--input
|
||||
placeholder="请选择"
|
||||
v-model="form.otherCateName"
|
||||
fontSize="24rpx"
|
||||
:disabled="!form.otherCate" @change="setOther"
|
||||
></u--input>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">信息标题:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--input
|
||||
placeholder="一句话简介物资,如拍卖直缝钢管200吨等"
|
||||
v-model="form.title"
|
||||
fontSize="24rpx"
|
||||
></u--input>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">回收方简述:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--textarea
|
||||
placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
|
||||
v-model="form.desc"
|
||||
fontSize="24rpx"
|
||||
></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<view class="lb">回收物实景照片:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u-upload
|
||||
multiple
|
||||
:fileList="form.files"
|
||||
@afterRead="afterRead"
|
||||
@delete="deletePic"
|
||||
width="120rpx"
|
||||
height="120rpx"
|
||||
></u-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">回收单位所在地:</view>
|
||||
<view class="vl flex-1 p-right-20" @click="showAddress">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
placeholder="请选择"
|
||||
v-model="region"
|
||||
fontSize="24rpx"
|
||||
suffixIcon="arrow-down-fill"
|
||||
suffixIconStyle="font-size: 10px;color: #d5d5d5"
|
||||
:disabled="true"
|
||||
disabledColor="#fff"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-item half flex align-center flex-wrap mt-20 w-100p">
|
||||
<text class="need text-red">*</text>
|
||||
<view class="lb">回收单位地址:</view>
|
||||
<view class="vl flex-1 p-right-20">
|
||||
<u--input placeholder="请选择" v-model="form.addressDetail"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-title m-top-30">回收单位信息</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司信息' : '个人信息' }} :</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplier.companyName"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">{{ user.accountType === 2 ? '公司联系方式' : '个人联系方式' }} :</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplier.contract"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">联系人:</view>
|
||||
<view class="vl flex-1" @click="showContactPicker = true">
|
||||
<u--input
|
||||
style="pointer-events:none"
|
||||
readonly
|
||||
placeholder="点击选择联系人"
|
||||
v-model="form.supplier.managerName"
|
||||
suffixIcon="arrow-right"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group flex align-center m-top-30">
|
||||
<view class="lb m-right-20">联系方式:</view>
|
||||
<view class="vl flex-1">
|
||||
<u--input
|
||||
disabled
|
||||
placeholder="请输入内容"
|
||||
v-model="form.supplier.managerContract"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
|
||||
<el-radio label="是" v-model="checked">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio label="否" v-model="checked">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">是否加急({{ urgentAmount }}元/次):</text>
|
||||
<el-radio :label="true" v-model="form.isUrgent">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio :label="false" v-model="form.isUrgent">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<el-checkbox :value="agree" active-color="#A92924" @change="handleAgreementCheck">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-30 m-a w-100p">
|
||||
<view class="flex-1 mx-15">
|
||||
<u-button type="primary" @click="save" plain="">暂存</u-button>
|
||||
</view>
|
||||
<view class="flex-1 mx-15">
|
||||
<u-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker v-if="showPicker" :show="showPicker" :columns="[cateData, cateData[cateDataIndex].children]"
|
||||
keyName="name" @change="changeCate"
|
||||
@cancel="showPicker = false" @close="showPicker = false" closeOnClickOverlay
|
||||
@confirm="confirmCate"></u-picker>
|
||||
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
||||
<u-picker :show="showUnit" :columns="[unitList]"
|
||||
@cancel="showUnit = false" @close="showUnit = false" closeOnClickOverlay
|
||||
@confirm="confirmUnit"></u-picker>
|
||||
<u-datetime-picker :show="showExpire" v-model="expireTime" mode="date" @cancel="showExpire = false"
|
||||
:minDate="minDate" :maxDate="maxDate"
|
||||
@confirm="handConfirmDate"></u-datetime-picker>
|
||||
<u-picker :show="showContactPicker" :columns="[contactList]" keyName="name"
|
||||
@cancel="showContactPicker = false" @close="showContactPicker = false" closeOnClickOverlay
|
||||
@confirm="confirmContact"></u-picker>
|
||||
<agreement ref="agreementRef" @read-complete="onAgreementReadComplete"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import AddressSelect from "@/components/AddressSelect.vue";
|
||||
import dayjs from "dayjs";
|
||||
import md5 from "js-md5";
|
||||
import Agreement from "@/pages/junk/agreement.vue";
|
||||
|
||||
export default {
|
||||
name: "type_0",
|
||||
components: {Agreement, AddressSelect},
|
||||
props: {
|
||||
urgentAmount: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
remainOldNum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
agreement: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
commonContractUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
contactList: {
|
||||
type: Array,
|
||||
default: ''
|
||||
},
|
||||
user: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
agree: false,
|
||||
agreementReadCompleted: false,
|
||||
unitList: ['吨', '万吨'],
|
||||
allChildCate: [],
|
||||
cateData: [],
|
||||
cateDataIndex: 0,
|
||||
form: {
|
||||
type: 3,
|
||||
category: 0,
|
||||
files: [],
|
||||
otherCate: false,
|
||||
otherCateName: '',
|
||||
title: '',
|
||||
desc: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
startNum: '',
|
||||
unit: '吨',
|
||||
startAmount: '',
|
||||
expiredTime: '',
|
||||
offerAddressRegion: {},
|
||||
offerAddressNoLimit: false,
|
||||
payMethod: '预付',
|
||||
prePayRate: '',
|
||||
otherPayMethodDesc: '',
|
||||
signMethod: 0,
|
||||
buyer: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
supplier: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
contractAttachment: [],
|
||||
isUrgent: false,
|
||||
supplementary: ''
|
||||
},
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
offerProvinceIndex: null,
|
||||
offerCityIndex: null,
|
||||
offerAreaIndex: null,
|
||||
checked: '否',
|
||||
showPicker: false,
|
||||
cateName: '',
|
||||
region: '',
|
||||
showUnit: false,
|
||||
showExpire: false,
|
||||
expireTime: '',
|
||||
showContactPicker: false,
|
||||
minDate: Number(new Date()),
|
||||
maxDate: dayjs().add(1, 'year').valueOf()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showAddress() {
|
||||
this.$refs.AddressSelect.open(this.form.addressRegion);
|
||||
},
|
||||
regionConfirm({province, city, area}) {
|
||||
this.form.addressRegion = {province, city, area}
|
||||
this.region = `${province.name} ${city.name} ${area.name}`
|
||||
},
|
||||
async publish() {
|
||||
if (this.remainOldNum === 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您的旧货发布次数已用完,是否立即购买?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${data}`
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.form.addressRegion) return this.$message({
|
||||
message: "请选择完整的物资所在地",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.addressDetail) return this.$message({
|
||||
message: "请填写详细物资所在地",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.title) return this.$message({
|
||||
message: "请填写标题",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.otherCate) {
|
||||
if (!this.form.category) return this.$message({
|
||||
message: "请选择分类",
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
if (!this.form.otherCateName) return this.$message({
|
||||
message: "请输入其他分类",
|
||||
type: 'warning'
|
||||
})
|
||||
this.form.category = ['', this.form.otherCateName]
|
||||
}
|
||||
if (!this.form.expiredTime) return this.$message({
|
||||
message: "请选择失效时间",
|
||||
type: 'warning'
|
||||
})
|
||||
if (dayjs(this.form.expiredTime).valueOf() > this.maxDate) return this.$message({
|
||||
message: "为保证信息有效性发布最长时限为1年(12个月)",
|
||||
type: 'warning'
|
||||
})
|
||||
|
||||
this.form.files = this.form.files.map(i => i.url)
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/old/kh/add',
|
||||
data: this.form
|
||||
})
|
||||
localStorage.removeItem("old_3")
|
||||
this.$message({
|
||||
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.form.isUrgent) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/shop/pay?id=${res.data}`
|
||||
})
|
||||
} else {
|
||||
vk.redirectTo({url: '/pages/junk/junk'});
|
||||
}
|
||||
}, 1500)
|
||||
},
|
||||
handleAgreementCheck(value) {
|
||||
if (!value) {
|
||||
this.agree = false
|
||||
return
|
||||
}
|
||||
if (!this.agreementReadCompleted) {
|
||||
this.agree = false
|
||||
uni.showToast({
|
||||
title: '请先查看《金久信旧货交易协议》5秒以上',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.agree = true
|
||||
},
|
||||
onAgreementReadComplete() {
|
||||
this.agreementReadCompleted = true
|
||||
},
|
||||
showAgreement() {
|
||||
// this.$confirm(this.agreement, '金久信旧货交易协议', {
|
||||
// cancelButtonText: '关闭',
|
||||
// showConfirmButton: false,
|
||||
// dangerouslyUseHTMLString: true,
|
||||
// })
|
||||
this.$refs.agreementRef.open()
|
||||
},
|
||||
openDownload() {
|
||||
// window.open(this.commonContractUrl)
|
||||
window.location.href = this.commonContractUrl
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
confirmCate({value}) {
|
||||
this.form.category = value.map(i => i.name)
|
||||
this.cateName = `${value[0].name}${value[1].name}`
|
||||
this.showPicker = false
|
||||
},
|
||||
confirmUnit({value}) {
|
||||
this.form.unit = value
|
||||
this.showUnit = false
|
||||
},
|
||||
afterRead({file}) {
|
||||
file.forEach(item => {
|
||||
const suffix = item.name.split('.').pop()
|
||||
uniCloud.uploadFile({
|
||||
filePath: item.url,
|
||||
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + md5(item.name + Date.now().toString()) + `.${suffix}`,
|
||||
success: ({fileID}) => {
|
||||
uniCloud.getTempFileURL({
|
||||
fileList: [fileID]
|
||||
}).then(res => {
|
||||
this.form.files.push({url: res.fileList[0].tempFileURL})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
deletePic({index}) {
|
||||
this.form.files.splice(index, 1)
|
||||
},
|
||||
handConfirmDate({value}) {
|
||||
this.form.expiredTime = dayjs(value).format('YYYY-MM-DD')
|
||||
this.showExpire = false
|
||||
},
|
||||
confirmContact({value}) {
|
||||
this.form.supplier.managerName = value[0].name
|
||||
this.form.supplier.managerContract = value[0].phone
|
||||
this.showContactPicker = false
|
||||
},
|
||||
changeCate({columnIndex, index}) {
|
||||
if (columnIndex === 0) {
|
||||
this.cateDataIndex = index
|
||||
}
|
||||
},
|
||||
save() {
|
||||
localStorage.setItem("old_3", JSON.stringify({
|
||||
form: this.form,
|
||||
cateName: this.cateName,
|
||||
region: this.region,
|
||||
}))
|
||||
this.$message({
|
||||
message: "已保存",
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
setOther(){
|
||||
this.cateName = ''
|
||||
},
|
||||
openPicker(){
|
||||
if(this.form.otherCate) return
|
||||
this.showPicker = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {type: 3},
|
||||
success: (data) => {
|
||||
this.cateData = data.rows.map(item => {
|
||||
item.children.forEach(child => {
|
||||
delete child.children
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
if (this.user.accountType === 2) {
|
||||
this.form.supplier.companyName = this.user.company.companyName
|
||||
this.form.supplier.contract = this.user.company.mobile
|
||||
} else {
|
||||
this.form.supplier.companyName = this.user.person.personName
|
||||
this.form.supplier.contract = this.user.person.mobile
|
||||
}
|
||||
this.form.supplier.contract = this.user.businessCard.companyMobile
|
||||
if (!!localStorage.getItem("old_3")) {
|
||||
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const savedData = JSON.parse(localStorage.getItem("old_3"))
|
||||
this.form = savedData.form
|
||||
this.cateName = savedData.cateName
|
||||
this.region = savedData.region
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.layout-header {
|
||||
margin: 0rpx 30rpx;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid rgba(169, 41, 36, 0.34);
|
||||
|
||||
.big {
|
||||
font-size: 32rpx;
|
||||
line-height: 48rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #9a9a9a;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ptb {
|
||||
margin-right: 20rpx;
|
||||
padding: 6rpx 14rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
border: 1px solid #f2f2f2;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #ffffff;
|
||||
border-color: #A92924;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.public-btn {
|
||||
width: 95%;
|
||||
margin-top: 60rpx;
|
||||
color: #ffffff;
|
||||
background: #A92924;
|
||||
}
|
||||
|
||||
.layout-publish {
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.tag-title {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #000000;
|
||||
|
||||
.limit {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.tag-box {
|
||||
padding: 20rpx 0;
|
||||
|
||||
.item {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 32rpx;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.lb, .fix {
|
||||
position: relative;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.lbx {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.download {
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
border: 1px solid #A92924;
|
||||
}
|
||||
|
||||
.need::before {
|
||||
position: absolute;
|
||||
left: -16rpx;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -12rpx;
|
||||
content: '*';
|
||||
color: #A92924;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 48rpx;
|
||||
color: #A92924;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
margin-top: -14rpx;
|
||||
content: '';
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
background: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.template-tab {
|
||||
.ttb {
|
||||
margin-right: 30rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
border: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
}
|
||||
|
||||
.template-content {
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
padding: 18rpx 0;
|
||||
}
|
||||
|
||||
.expire-tip {
|
||||
padding: 0 20rpx 18rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
margin-left: 0;
|
||||
width: 180rpx;
|
||||
height: 60rpx;
|
||||
color: #A92924;
|
||||
border-color: #A92924;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user