123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867 |
- <template>
- <div class="detail-container">
- <!-- <el-page-header content="审批" @back="goBack" /> -->
- <div class="main-title">
- <div class="title">工程信息单</div>
- </div>
- <div class="diy-table-1">
- <el-row>
- <el-col :span="8" class="item">
- <div class="label">工程登录编号</div>
- <div class="value">{{ detailData.enginInfoNo }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">订单日期</div>
- <div class="value">{{ detailData.orderDate }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">业务员</div>
- <div class="value">
- <el-select
- v-model="detailData.serviceId"
- placeholder="选择业务员"
- size="small"
- filterable
- clearable
- style="width: 100%"
- >
- <el-option
- v-for="item in salesmanList"
- :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.customerNumber }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">项目名称</div>
- <div class="value">
- <el-input v-model="detailData.projectName" placeholder="请输入项目名称" />
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">机型类别</div>
- <div class="value">
- <el-select
- v-model="detailData.machineType"
- placeholder="选择机型类别"
- size="small"
- clearable
- style="width: 100%"
- >
- <el-option
- v-for="item in machineTypeList"
- :key="item.dictCode"
- :label="item.dictValue"
- :value="item.dictCode"
- />
- </el-select>
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">经销商名称</div>
- <div class="value">{{ detailData.customerName }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">使用单位</div>
- <div class="value">
- <el-input v-model="detailData.useUnit" placeholder="请输入使用单位" />
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">行业类别</div>
- <div class="value">
- <el-select
- v-model="detailData.tradeCategory"
- placeholder="选择行业类别"
- size="small"
- clearable
- style="width: 100%"
- >
- <el-option v-for="item in tradeCategoryList" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">工程编号</div>
- <div class="value">
- <el-input v-model="detailData.projectNo" placeholder="请输入工程编号" />
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">厂工程编码</div>
- <div class="value">
- <el-input v-model="detailData.enginFactoryNo" placeholder="请输入厂工程编码" />
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">工程登录类型</div>
- <div class="value">
- <el-select
- v-model="detailData.enginSignType"
- placeholder="选择工程登录类型"
- size="small"
- clearable
- style="width: 100%"
- >
- <el-option
- v-for="item in loginTypeList"
- :key="item.dictCode"
- :label="item.dictValue"
- :value="item.dictCode"
- />
- </el-select>
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">联系人</div>
- <div class="value">
- <el-input v-model="detailData.linkman" placeholder="请输入联系人" />
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">联系电话</div>
- <div class="value">
- <el-input v-model="detailData.phone" placeholder="请输入联系电话" />
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">固定电话</div>
- <div class="value">
- <el-input v-model="detailData.tel" placeholder="请输入固定电话" />
- </div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">文件编号</div>
- <div class="value">{{ detailData.fileNo }}</div>
- </el-col>
- <el-col :span="24" class="item">
- <div class="label">安装地址</div>
- <div class="value">
- <el-input v-model="detailData.installAddress" placeholder="请输入安装地址" />
- </div>
- </el-col>
- <el-col v-if="!isCustomer" :span="24" class="item">
- <div class="label">格力内部备注</div>
- <div class="value">
- <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
- </div>
- </el-col>
- <el-col :span="24" class="item">
- <div class="label">格力回复</div>
- <div class="value">
- <el-input v-model="detailData.geLiNote" placeholder="请输入格力回复" />
- </div>
- </el-col>
- <el-col :span="24" class="item">
- <div class="label">备注</div>
- <div class="value">
- <el-input v-model="detailData.remark" placeholder="请输入备注" />
- </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.createTime }}</div>
- </el-col>
- <el-col :span="8" class="item">
- <div class="label">合同有效期</div>
- <div class="value">
- <el-date-picker
- v-model="detailData.contractExpireDate"
- type="date"
- prefix-icon="none"
- value-format="yyyy-MM-dd"
- style="width: 100%"
- placeholder="选择日期"
- />
- </div>
- </el-col>
- </el-row>
- </div>
- <div class="main-title">
- <div class="title">货品信息</div>
- <div>
- <el-button type="primary" size="small" icon="el-icon-plus" @click="openDialog">添加货品</el-button>
- </div>
- </div>
- <div class="table" style="margin-top: 20px">
- <el-table
- :data="goodsList"
- 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 align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip />
- <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
- <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
- <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
- <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input v-model="scope.row.specification" size="small" />
- </template>
- </el-table-column>
- <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
- <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent />
- </template>
- </el-table-column>
- <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
- </template>
- </el-table-column>
- <el-table-column align="right" label="订单金额" min-width="100" prop="compute_amount" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ scope.row.compute_amount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column align="left" label="备注" prop="remark" min-width="200" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input v-model="scope.row.remark" size="small" />
- </template>
- </el-table-column>
- <el-table-column align="left" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip />
- <el-table-column align="center" label="操作" width="100" fixed="right">
- <template slot-scope="scope">
- <el-button type="text" @click="deleteItem(scope.$index, scope.row.cid)">删除</el-button>
- </template>
- </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="8" class="item">-->
- <!-- <div class="label">是否计划单</div>-->
- <!-- <div class="value">-->
- <!-- <el-radio-group v-model="examineForm.isPlanOrder" :disabled="websitNumber === 'GZ'">-->
- <!-- <el-radio :label="true">是</el-radio>-->
- <!-- <el-radio :label="false">否</el-radio>-->
- <!-- </el-radio-group>-->
- <!-- </div>-->
- <!-- </el-col>-->
- <el-col :span="12" class="item">
- <div class="label">审批结果</div>
- <div class="value">
- <el-radio-group v-model="examineForm.examineResult">
- <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="examineForm.remark" placeholder="请输入内容" />
- </div>
- </el-col>
- </el-row>
- </div>
- <div class="page-footer">
- <div class="footer">
- <el-button type="primary" :loading="formLoading" @click="clickSubmitForm">{{
- formLoading ? '提交中 ...' : '提 交'
- }}</el-button>
- <el-popconfirm title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
- <el-button slot="reference">返回列表</el-button>
- </el-popconfirm>
- </div>
- </div>
- <el-dialog title="添加产品" :visible.sync="isShowGoodsDialog" width="80%">
- <el-form ref="goodsScreenForm" :model="goodsScreenForm" size="small" label-position="left">
- <el-row :gutter="20">
- <el-col :xs="12" :sm="6" :lg="6">
- <el-form-item prop="salesType">
- <el-select v-model="goodsScreenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
- <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6" :lg="6">
- <el-form-item prop="proNum">
- <el-input v-model="goodsScreenForm.proNum" placeholder="请输入产品编码" />
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6" :lg="6">
- <el-form-item prop="proName">
- <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称" />
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6" :lg="6">
- <el-form-item prop="proModel">
- <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号" />
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6" :lg="6">
- <el-form-item prop="price1" style="display: flex">
- <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%" />
- <span> - </span>
- <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%" />
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="18" :lg="18" class="tr">
- <el-form-item label="">
- <el-button size="small" @click="resetGoodsScreenForm">清空</el-button>
- <el-button size="small" type="primary" @click="submitGoodsScreenForm">搜索</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div class="tables">
- <div class="table">
- <el-table
- :data="leftGoodsList"
- element-loading-text="Loading"
- border
- fit
- highlight-current-row
- stripe
- height="400"
- @selection-change="leftSelectionChange"
- >
- <el-table-column align="center" type="selection" width="55" :selectable="checkboxSelect" />
- <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
- <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
- <el-table-column
- align="center"
- label="产品型号"
- prop="specification"
- min-width="160"
- show-overflow-tooltip
- />
- <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
- </el-table>
- <div class="pagination clearfix" style="margin-top: 10px">
- <div class="fr">
- <el-pagination
- :current-page="currentPage"
- :page-size="10"
- background
- layout="prev, pager, next"
- :total="listTotal"
- @current-change="handleTableCurrentChange"
- />
- </div>
- </div>
- </div>
- <div class="buttons">
- <el-button size="small" type="primary" @click="addAllGoods">全部添加</el-button>
- <el-button size="small" type="primary" @click="addGoods">添 加</el-button>
- <el-button size="small" type="danger" @click="deleteGoods">删 除</el-button>
- <el-button size="small" type="danger" @click="deleteAllGoods">全部删除</el-button>
- </div>
- <div class="table">
- <el-table
- :data="rightGoodsList"
- element-loading-text="Loading"
- border
- fit
- highlight-current-row
- stripe
- height="400"
- @selection-change="rightSelectionChange"
- >
- <el-table-column align="center" type="selection" width="55" />
- <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
- <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
- <el-table-column
- align="center"
- label="产品型号"
- prop="specification"
- min-width="160"
- show-overflow-tooltip
- />
- <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
- </el-table>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="closeDialog">取 消</el-button>
- <el-button type="primary" @click="submitAddGoods">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import { getEnginDetail, getRetailProductList, examineEngin } from '@/api/supply/engin'
- import { getTypeList, getSalesmanList, getDictList } from '@/api/common'
- import { mapGetters } from 'vuex'
- export default {
- name: 'EnginExamine',
- componentName: 'EnginExamine',
- filters: {
- statusFilter(val) {
- const statusList = [
- { label: '已保存', value: 'SAVE' },
- { label: '待审核', value: 'WAIT' },
- { label: '审核通过', value: 'OK' },
- // { label: '审核驳回', value: 'FAIL' },,
- { label: '已关闭', value: 'CLOSE' }
- ]
- const obj = statusList.find(o => o.value == val)
- return obj ? obj.label : ''
- }
- },
- props: ['listItem'],
- data() {
- return {
- detailData: {},
- goodsList: [],
- userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
- formLoading: false,
- examineForm: {
- examineResult: true,
- remark: '',
- isPlanOrder: ''
- },
- salesTypeList: [],
- salesmanList: [],
- machineTypeList: [],
- loginTypeList: [],
- powerList: [],
- tradeCategoryList: [
- { value: '房地产', label: '房地产' },
- { value: '公共建筑', label: '公共建筑' },
- { value: '工业制造', label: '工业制造' },
- { value: '商业项目', label: '商业项目' },
- { value: '采暖及清洁能源', label: '采暖及清洁能源' },
- { value: '轨道交通', label: '轨道交通' },
- { value: '数据通讯', label: '数据通讯' },
- { value: '冷冻冷藏', label: '冷冻冷藏' },
- { value: '高端制造', label: '高端制造' },
- { value: '医院医疗', label: '医院医疗' },
- { value: '其他', label: '其他' }
- ],
- isShowGoodsDialog: false,
- goodsScreenForm: {
- proNum: '',
- proName: '',
- proModel: '',
- price1: '',
- price2: '',
- salesType: ''
- },
- currentPage: 1,
- listTotal: 0,
- leftGoodsList: [],
- rightGoodsList: [],
- leftSelection: [],
- rightSelection: [],
- examineStatus: ''
- }
- },
- computed: {
- ...mapGetters(['isCustomer', 'websitNumber'])
- },
- watch: {
- goodsList: {
- handler(newValue, oldValue) {
- if (newValue && newValue.length) {
- newValue.forEach((item, index) => {
- this.goodsList[index].compute_amount = item.price * item.qty
- })
- }
- },
- immediate: true,
- deep: true
- }
- },
- created() {
- this.getDetail()
- this.getTypeList()
- this.getSalesmanList()
- this.getDictList()
- },
- methods: {
- // 返回列表
- goBack() {
- this.$emit('backListFormDetail')
- },
- // 获取详情
- getDetail() {
- // if (this.websitNumber === 'GZ') {
- // this.examineForm.isPlanOrder = false
- // }
- getEnginDetail({ id: this.listItem.enginInfoId }).then(res => {
- this.detailData = res.data
- this.examineStatus = res.data.examineStatus
- res.data.items.forEach(item => {
- item.sums1 = ['qty', 'hasOrderQty', 'hasDeliverQty']
- item.sums2 = ['compute_amount', 'price']
- item.cid = item.id
- })
- this.goodsList = res.data.items
- })
- },
- // 获取销售类型列表
- getTypeList() {
- getTypeList({
- pageNum: 1,
- pageSize: -1
- }).then(res => {
- this.salesTypeList = res.data.records
- })
- },
- getSalesmanList() {
- getSalesmanList({
- pageNum: 1,
- pageSize: -1,
- isCustomer: 0,
- status: true
- }).then(res => {
- this.salesmanList = res.data.records
- })
- },
- // 获取产品大类列表
- getDictList() {
- getDictList({ sysDictEnum: 'MACHINE_TYPE' }).then(res => {
- this.machineTypeList = res.data
- })
- getDictList({ sysDictEnum: 'POWER_CATEGORY' }).then(res => {
- this.powerList = res.data
- })
- getDictList({ sysDictEnum: 'SIGN_TYPE' }).then(res => {
- this.loginTypeList = res.data
- })
- },
- // 获取商品列表
- getGoodsList() {
- getRetailProductList({
- pageNum: this.currentPage,
- pageSize: 10,
- saleId: this.goodsScreenForm.salesType,
- materialCode: this.goodsScreenForm.proNum,
- materialName: this.goodsScreenForm.proName,
- specification: this.goodsScreenForm.proModel,
- price1: this.goodsScreenForm.price1,
- price2: this.goodsScreenForm.price2
- }).then(res => {
- const oldGoodsList = this.goodsList
- const newGoodsList = res.data.records
- for (let i = 0; i < oldGoodsList.length; i++) {
- const oldItem = oldGoodsList[i]
- for (let j = 0; j < newGoodsList.length; j++) {
- const newItem = newGoodsList[j]
- if (newItem.id === oldItem.id) {
- newGoodsList[j].selected = true
- break
- }
- }
- }
- res.data.records.forEach(item => {
- item.materialName = item.name
- item.materialCode = item.number
- item.saleTypeName = item.saleName
- item.unit = item.baseUnit
- item.price = item.batchPrice
- item.tax = item.taxRate
- item.isDirectTransfer = false
- item.directTransferQty = ''
- item.status1 = ''
- item.status2 = ''
- item.rebateAmount = ''
- item.rebateRate = ''
- item.productPriceId = item.id
- // item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
- })
- this.leftGoodsList = res.data.records
- this.listTotal = res.data.total
- })
- },
- // 查询重复值并禁选
- checkboxSelect(row, rowIndex) {
- if (row.selected) {
- return false // 禁用
- } else {
- return true // 不禁用
- }
- },
- // 点击 选择商品
- openDialog() {
- this.isShowGoodsDialog = true
- this.getGoodsList()
- },
- // 提交筛选表单
- submitGoodsScreenForm() {
- this.currentPage = 1
- this.getGoodsList()
- },
- // 重置筛选表单
- resetGoodsScreenForm() {
- this.$refs.goodsScreenForm.resetFields()
- this.currentPage = 1
- this.getGoodsList()
- },
- // 更改列表当前页
- handleTableCurrentChange(val) {
- this.currentPage = val
- this.getGoodsList()
- },
- // 关闭 弹窗
- closeDialog() {
- this.isShowGoodsDialog = false
- },
- // 左侧列表选择
- leftSelectionChange(val) {
- this.leftSelection = val
- },
- // 右侧列表选择
- rightSelectionChange(val) {
- this.rightSelection = val
- },
- // 数组去重
- delRepeat(arr1, arr2) {
- const allArr = arr1.concat(arr2) // 两个数组对象合并
- const newArr = [] // 存放去重后数据的新数组
- for (let i = 0; i < allArr.length; i++) {
- // 循环allArr数组对象的内容
- let flag = true // 建立标记,判断数据是否重复,true为不重复
- for (let j = 0; j < newArr.length; j++) {
- // 循环新数组的内容
- if (allArr[i].id == newArr[j].id) {
- // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
- flag = false
- }
- }
- if (flag) {
- // 判断是否重复
- newArr.push(allArr[i]) // 不重复的放入新数组。 新数组的内容会继续进行上边的循环。
- }
- }
- return newArr
- },
- // 全部添加
- addAllGoods() {
- this.rightGoodsList = this.delRepeat(this.leftGoodsList, this.rightGoodsList)
- },
- // 添加
- addGoods() {
- this.rightGoodsList = this.delRepeat(this.leftSelection, this.rightGoodsList)
- },
- // 删除
- deleteGoods() {
- const rightGoodsList = this.rightGoodsList
- const rightSelection = this.rightSelection
- for (let i = 0; i < rightGoodsList.length; i++) {
- for (let j = 0; j < rightSelection.length; j++) {
- if (rightSelection[j].materialId == rightGoodsList[i].materialId) {
- this.rightGoodsList.splice(i, 1)
- }
- }
- }
- },
- // 全部删除
- deleteAllGoods() {
- this.rightGoodsList = []
- },
- // 确定 添加产品
- submitAddGoods() {
- // this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
- this.goodsList = this.goodsList.concat(this.rightGoodsList)
- this.goodsList = this.goodsList.concat(this.rightGoodsList)
- this.goodsList.forEach(k => {
- k.cid = ''
- })
- this.isShowGoodsDialog = false
- this.leftGoodsList = []
- this.rightGoodsList = []
- },
- // 删除产品
- deleteItem(index, id) {
- if (this.listItem && this.examineStatus === 'OK' && id) {
- this.$errorMsg('不能删除')
- return
- }
- this.goodsList.splice(index, 1)
- },
- clickSubmitForm() {
- // if (this.websitNumber === 'GZ') {
- if (!this.detailData.serviceId) {
- return this.$errorMsg('请选择业务员')
- }
- this.$confirm('此操作将审批订单, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- const saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId)
- const params = JSON.parse(JSON.stringify(this.detailData))
- params.enginInfoId = this.listItem.enginInfoId
- params.mainId = this.listItem.mainId
- params.examineResult = this.examineForm.examineResult
- params.examineNote = this.examineForm.remark
- params.isPlanOrder = this.examineForm.isPlanOrder
- params.serviceName = saleManItem.nickName
- params.items = this.goodsList
- this.formLoading = true
- examineEngin(params)
- .then(res => {
- this.$successMsg('审批成功')
- this.goBack()
- this.$parent.getList()
- })
- .finally(res => {
- this.formLoading = false
- })
- })
- .catch(() => {})
- // return
- // }
- // this.$confirm('请确认信息单是否未计划单,请勾选是否计划单选项', '提示', {
- // confirmButtonText: '是计划单',
- // cancelButtonText: '不是计划单',
- // type: 'warning'
- // })
- // .then(() => {
- // this.examineForm.isPlanOrder = true
- // })
- // .catch(() => {
- // this.examineForm.isPlanOrder = false
- // })
- // .finally(() => {
- // if (!this.detailData.serviceId) {
- // return this.$errorMsg('请选择业务员')
- // }
- // this.$confirm('此操作将审批订单, 是否继续?', '提示', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // type: 'warning'
- // })
- // .then(() => {
- // const saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId)
- // const params = JSON.parse(JSON.stringify(this.detailData))
- // params.enginInfoId = this.listItem.enginInfoId
- // params.mainId = this.listItem.mainId
- // params.examineResult = this.examineForm.examineResult
- // params.examineNote = this.examineForm.remark
- // params.isPlanOrder = this.examineForm.isPlanOrder
- // params.serviceName = saleManItem.nickName
- // params.items = this.goodsList
- // this.formLoading = true
- // examineEngin(params)
- // .then(res => {
- // this.$successMsg('审批成功')
- // this.goBack()
- // this.$parent.getList()
- // })
- // .finally(res => {
- // this.formLoading = false
- // })
- // })
- // .catch(() => {})
- // })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .detail-container {
- width: 100%;
- height: 100%;
- }
- .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;
- }
- }
- .tables {
- display: flex;
- margin-top: 10px;
- .table {
- width: 45%;
- }
- .buttons {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- padding: 0 10px;
- button {
- margin: 0;
- margin-top: 10px;
- }
- }
- }
- ::v-deep input::-webkit-outer-spin-button,
- ::v-deep input::-webkit-inner-spin-button {
- -webkit-appearance: none;
- }
- ::v-deep input[type='number'] {
- -moz-appearance: textfield;
- }
- </style>
|