| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <template>
- <view class="mainBox">
- <uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="订单详情"
- @clickLeft="back">
- </uni-nav-bar>
- <myCard :item="form" :columns="columns"></myCard>
- <view class="item">
- <view class="card">
- <view>
- <view class="lable">订单数量</view>
- <view>{{orderNoCountData.saleOrderNumber}}</view>
- </view>
- <view>
- <view class="lable">订单总金额</view>
- <view>{{orderNoCountData.totalAmountSaleOrder}}</view>
- </view>
- <view>
- <view class="lable">应收款</view>
- <view>{{orderNoCountData.receivable}}</view>
- </view>
- <view>
- <view class="lable">
- 发货数量</view>
- <view>{{orderNoCountData.sendNumber}}</view>
- </view>
- <view>
- <view class="lable">
- 退货数量</view>
- <view>{{orderNoCountData.returnNumber}}</view>
- </view>
- <view>
- <view class="lable">
- 退货金额</view>
- <view>{{orderNoCountData.returnAmount}}</view>
- </view>
- </view>
- </view>
- <!-- <u-sticky bgColor="#fff" :customNavHeight="88"> -->
- <u-tabs :list="list1" @change="change" :current="current"></u-tabs>
- <!-- </u-sticky> -->
- <info ref="infoRef" :isDrawer="true" v-show="current==0"></info>
- <produceList v-show="current==1" ref="produceListRef" :pricingWay="form.pricingWay"
- :contractId="form.contractId" :columns="produceLisTcolumns">
- </produceList>
- </view>
- </template>
- <script>
- import produceList from "../../components/produceList.vue"
- import info from "./info.vue"
- import {
- getSaleOrderDetail,
- queryOrderNoCount
- } from '@/api/saleManage/saleorder'
- import myCard from '../../components/myCard.vue'
- export default {
- components: {
- produceList,
- info,
- myCard
- },
- data() {
- return {
- columns: [
- [{
- label: '编码:',
- prop: 'orderNo',
- type: 'title',
- className: 'perce100',
- }],
- [{
- label: '产品名称:',
- prop: 'productNames',
- className: 'perce100',
- }],
- [{
- label: '项目名称:',
- prop: 'projectName'
- }, {
- label: '客户名称:',
- prop: 'partaName'
- }],
- [{
- label: '合同名称:',
- prop: 'contractName',
- }, {
- label: '销售类型:',
- prop: 'saleTypeName',
- }],
- ],
- produceLisTcolumns: [
- [{
- label: '产品名称:',
- prop: 'productName',
- type: 'title',
- className: 'perce100',
- }],
- [{
- label: '编码:',
- prop: 'productCode'
- }, {
- label: '牌号:',
- prop: 'productBrand'
- }],
- [{
- label: '规格:',
- prop: 'specification'
- }, {
- label: '型号:',
- prop: 'modelType'
- }],
- [{
- label: '数量:',
- prop: 'totalCount',
- slot: 'totalCount',
- }, {
- label: '计量单位:',
- prop: 'measuringUnit',
- }],
- [{
- label: '单价:',
- prop: 'singlePrice',
- slot: 'singlePrice',
- }, {
- label: '折让单价:',
- formatter: (item) => {
- return (item.discountSinglePrice ?
- Number(item.discountSinglePrice).toFixed(2) :
- '') + '元';
- }
- }],
- [{
- label: '合计:',
- prop: 'totalPrice',
- formatter: (item) => {
- return (item.totalPrice || '') + '元';
- }
- }, {
- label: '折让合计:',
- formatter: (item) => {
- return (item.discountTotalPrice ?
- Number(item.discountTotalPrice).toFixed(2) :
- '') + '元';
- }
- }],
- [{
- label: '客户代号:',
- prop: 'customerMark',
- slot: 'customerMark',
- }],
- [{
- label: '单重:',
- prop: 'singleWeight',
- slot: 'singleWeight',
- }, {
- label: '总重:',
- prop: 'totalWeight',
- }],
- [{
- label: '客户期望交期:',
- prop: 'customerExpectDeliveryDeadline',
- slot: 'customerExpectDeliveryDeadline',
- className: 'perce100',
- }],
- [{
- label: '质保期:',
- prop: 'guaranteePeriod',
- slot: 'guaranteePeriod',
- }, {
- label: '单位:',
- prop: 'guaranteePeriodUnitCode',
- slot: 'guaranteePeriodUnitCode',
- }],
- [{
- label: '操作:',
- prop: 'action',
- type: 'action',
- className: 'perce100',
- }],
- ],
- current: 0,
- list1: [{
- name: '详细信息',
- }, {
- name: '产品清单',
- }],
- form: {
- id: '',
- contractId: '',
- orderFiles: [],
- contractName: '',
- salesDeptName: '',
- pricingWay: 1,
- payAmount: '',
- generatePurchase: 0,
- generateProduce: 0,
- generateProject: 0,
- projectName: '',
- projectId: '',
- receiveAddress: '',
- remark: '',
- saleType: '',
- saleTypeName: '',
- totalAmount: '',
- settlementMode: '4',
- settlementModeName: '分期付款',
- partaUnifiedSocialCreditCode: '',
- partbUnifiedSocialCreditCode: '',
- partaAddress: '',
- partaEmail: '',
- partaFax: '',
- partaId: '',
- partaLinkId: '',
- partaLinkName: '',
- partaName: '',
- partaTel: '',
- partbAddress: '',
- partbEmail: '',
- partbFax: '',
- partbId: '',
- partbLinkId: '',
- partbLinkName: '',
- partbName: '',
- partbTel: '',
- needProduce: 1
- },
- orderNoCountData: {
- saleOrderNumber: '', //订单数量
- totalAmountSaleOrder: '', //订单总金额
- sendNumber: '', //发货数量
- receivable: '', //应收款
- returnNumber: '', //退货数量
- returnAmount: '' //退货金额
- }
- }
- },
- onLoad(data) {
- getSaleOrderDetail(data.id).then(async res => {
- this.form = res
- this.form.contractId = this.form.contractId || '11'
- this.$nextTick(() => {
- this.$refs.infoRef.init(res)
- this.$refs.produceListRef.init(res.productList)
- })
- this.orderNoCountData = await queryOrderNoCount(res.orderNo)
- })
- },
- methods: {
- change(data) {
- this.current = data.index
- // console.log(data,'current')
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .item {
- padding: 16rpx 32rpx;
- .card {
- padding: 16rpx 32rpx;
- margin-top: 32rpx;
- display: flex;
- flex-wrap: wrap;
- height: 200rpx;
- border-radius: 12rpx;
- border: 1px solid #cbcbcb;
- >view {
- font-size: 26rpx;
- width: 33%;
- .lable {
- color: #999;
- margin-bottom: 10rpx;
- }
- }
- }
- }
- </style>
|