123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427 |
- <template>
- <div class="detail-container">
- <el-page-header @back="goBack" content="审批"></el-page-header>
- <div class="main-title">
- <div class="title">订单信息 <span style="margin-left: 20px">经销商名称:{{detailData.customerName}}</span></div>
- </div>
- <div class="diy-table-1">
- <el-row>
- <el-col :span="8" class="item">
- <div class="label">订单号</div>
- <div class="value">{{ detailData.id }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">订单日期</div>
- <div class="value">
- <el-date-picker
- v-model="detailData.theTime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%"
- placeholder="选择日期"
- >
- </el-date-picker>
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">单据状态</div>
- <div class="value">{{ detailData.examineStatus | statusFilter }}</div>
- </el-col>
- <el-col :span="16" class="item">
- <div class="label">备注</div>
- <div class="value">
- <template v-if="userName">
- <el-input v-model="detailData.remark" placeholder="填写备注" clearable></el-input>
- </template>
- <template v-else>
- {{ detailData.remark }}
- </template>
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">业务员</div>
- <div class="value">
- <el-select
- v-model="detailData.k3ServiceName"
- placeholder="选择业务员"
- style="width: 100%"
- @change="handleUser"
- >
- <el-option
- v-for="item in userList"
- :key="item.adminUserId"
- :label="item.nickName"
- :value="item.adminUserId"
- />
- </el-select>
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">制单人</div>
- <div class="value">{{ detailData.createName }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">审核人</div>
- <div class="value">{{ detailData.examineName }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">关闭人</div>
- <div class="value">{{ detailData.closeName }}</div>
- </el-col>
- <el-col :span="24" class="item" v-if="detailData.commercialType">
- <div class="label">计划单</div>
- <div class="value">
- <el-radio-group v-model="detailData.isPlanOrder" disabled>
- <el-radio :label="true">是</el-radio>
- <el-radio :label="false">否</el-radio>
- </el-radio-group>
- </div>
- </el-col>
- </el-row>
- </div>
- <div class="main-title">
- <div class="title">货品信息</div>
- </div>
- <div class="table" style="margin-top: 20px">
- <el-table
- :data="detailData.retailOrderItemList"
- element-loading-text="Loading"
- border
- fit
- highlight-current-row
- stripe
- max-height="400"
- show-summary
- :summary-method="$getSummaries"
- >
- <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
- <el-table-column
- align="center"
- label="销售类型"
- prop="saleTypeName"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="物料编码"
- prop="materialCode"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="产品名称"
- prop="materialName"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="规格型号"
- prop="specification"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="单位"
- prop="unit"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="单价"
- prop="price"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
- <el-table-column
- align="center"
- label="订单金额"
- prop="totalAmount"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="返利类型"
- prop="customerWalletName2"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <!-- v-for="item in scope.row.rebateWallets" -->
- <el-tag v-if="scope.row.customerWalletName2" type="success" size="small">
- {{ scope.row.customerWalletName2 }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column align="center" label="返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ scope.row.payRebateAmount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="格力折扣"
- prop="discAmount"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="现金钱包"
- prop="customerWalletName"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <!-- v-for="item in scope.row.rebateWallets" -->
- <el-tag type="success" size="small">
- {{ scope.row.customerWalletName }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="实付金额"
- prop="payAmount"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <!-- <el-table-column
- align="center"
- label="已退数量"
- prop="retiredQty"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column> -->
- <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ scope.row.isDirectTransfer ? '是' : '否' }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="直调数量"
- prop="directTransferQty"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="原订单数量"
- prop="oldQty"
- min-width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column align="left" label="表体业务员" prop="serviceName" min-width="100" show-overflow-tooltip />
- <el-table-column align="center" label="表体备注" prop="itemRemark" min-width="160" show-overflow-tooltip>
- <template slot-scope="scope">
- <!-- <div v-if="userName">
- <el-input v-model="scope.row.itemRemark" size="mini"></el-input>
- </div> -->
- <!-- <div v-else> -->
- {{ scope.row.itemRemark }}
- <!-- </div> -->
- </template>
- </el-table-column>
- <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
- </el-table>
- </div>
- <div class="main-title">
- <div class="title">审批信息</div>
- </div>
- <div class="diy-table-1">
- <el-row :gutter="0">
- <el-col :span="12" class="item">
- <div class="label">审批人</div>
- <div class="value">{{ userName }}</div>
- </el-col>
- <el-col :span="12" class="item">
- <div class="label">审批结果</div>
- <div class="value">
- <el-radio-group v-model="mainForm.status">
- <el-radio :label="true">通过</el-radio>
- <el-radio :label="false">驳回</el-radio>
- </el-radio-group>
- </div>
- </el-col>
- <el-col :span="24" class="item">
- <div class="label">审批说明</div>
- <div class="value">
- <el-input v-model="mainForm.remark" placeholder="请输入内容"></el-input>
- </div>
- </el-col>
- </el-row>
- </div>
- <div class="page-footer">
- <div class="footer" :class="classObj">
- <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{
- formLoading ? '提交中 ...' : '提 交'
- }}</el-button>
- <el-button @click="goBack">返回列表</el-button>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { examineData, getDetail, getUserList } from '@/api/supply/policy'
- export default {
- name: 'RetailExamine',
- componentName: 'RetailExamine',
- props: ['listItem'],
- filters: {
- statusFilter(val) {
- const statusList = [
- { label: '已保存', value: 'SAVE' },
- { label: '待审核', value: 'WAIT' },
- { label: '审核通过', value: 'OK' },
- { label: '审核驳回', value: 'FAIL' }
- ]
- let obj = statusList.find(o => o.value == val)
- return obj ? obj.label : ''
- }
- },
- data() {
- return {
- detailData: {},
- userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
- userList: [],
- formLoading: false,
- mainForm: {
- status: true,
- remark: '',
- theTime: ''
- }
- }
- },
- computed: {
- sidebar() {
- return this.$store.state.app.sidebar
- },
- classObj() {
- return {
- hideSidebar: !this.sidebar.opened,
- openSidebar: this.sidebar.opened
- }
- }
- },
- created() {
- this.getDetail()
- },
- methods: {
- // 返回列表
- goBack() {
- this.$emit('backListFormDetail')
- },
- // 获取详情
- getDetail() {
- getDetail({ id: this.listItem.id }).then(res => {
- res.data.retailOrderItemList.forEach(item => {
- item.sums1 = ['directTransferQty', 'qty', 'refundableQty', 'oldQty', 'tdQty']
- item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'totalDiscAmount', 'rebateAmount']
- })
- this.detailData = res.data
- })
- getUserList({
- pageNum: 1,
- pageSize: -1,
- adminWebsitId: '',
- isCustomer: 0,
- roleId: '',
- status: true,
- userName: ''
- }).then(res => {
- this.userList = res.data.records
- })
- },
- handleUser(e) {
- const user = this.userList.filter(k => {
- return k.adminUserId === e
- })[0]
- this.detailData.k3ServiceId = user.adminUserId
- this.detailData.k3ServiceName = user.nickName
- },
- // 提交审批
- clickSubmitForm() {
- this.formLoading = true
- examineData({
- id: this.listItem.id,
- examineStatus: this.mainForm.status ? 'OK' : 'FAIL',
- examineRemark: this.mainForm.remark,
- remark: this.detailData.remark,
- theTime: this.detailData.theTime,
- serviceId: this.detailData.k3ServiceId
- })
- .then(res => {
- this.$successMsg('审批成功')
- this.goBack()
- this.$parent.getList()
- })
- .finally(res => {
- this.formLoading = false
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- ::v-deep .el-input__prefix {
- display: none;
- left: 65px !important;
- -webkit-transition: all 0.3s;
- transition: all 0.3s;
- }
- ::v-deep .el-date-editor.el-input {
- width: 100%;
- box-sizing: border-box;
- padding-left: 10px;
- }
- .diy-table-1 {
- ::v-deep .el-form-item {
- margin: 0;
- }
- ::v-deep .el-input__suffix {
- right: -15px;
- -webkit-transition: all 0.3s;
- transition: all 0.3s;
- }
- }
- .detail-container {
- width: 100%;
- height: 100%;
- margin-bottom: 30px;
- }
- .main-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 20px;
- height: 60px;
- border-bottom: 1px solid #dcdfe6;
- margin-bottom: 20px;
- .title {
- font-size: 16px;
- font-weight: 600;
- padding-left: 10px;
- }
- }
- </style>
|