|
@@ -0,0 +1,666 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="customer-head">
|
|
|
+ <div class="customer-back">
|
|
|
+ <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
+ @click="backToList(0)">返回列表
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="add-customer-btn">
|
|
|
+ <el-button class="el-button--small-yh" type="primary" size="small" v-if="editButton"
|
|
|
+ @click="confirmEditing">编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button class="el-button--small-yh" type="primary" size="small" :disabled="isSave" @click="editCustomer">保存数据
|
|
|
+ </el-button>
|
|
|
+ <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '确认调拨'" @click="revoke"
|
|
|
+ :disabled="isSave">撤销调拨
|
|
|
+ </el-button>
|
|
|
+ <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;"
|
|
|
+ v-else @click="complete" :disabled="isSave">确认调拨
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 50px">
|
|
|
+ <trade-card title="基础信息">
|
|
|
+ <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="明细信息">
|
|
|
+ <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.shipItemsList"
|
|
|
+ :key="key" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
+ @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.1)"
|
|
|
+ @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.1)">
|
|
|
+ <template slot-scope="scope" slot="menuLeft">
|
|
|
+ <el-button type="primary" icon="el-icon-printer" size="small" @click="adddiailsfun">录入明细</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
+ <el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type"
|
|
|
+ @click="rowDelBox(row, index)">删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </trade-card>
|
|
|
+
|
|
|
+ <containerTitle title="上传附件"></containerTitle>
|
|
|
+ <c-upload v-loading="loadingBtn" typeUpload="LT" :disabled="isAddDisabled"
|
|
|
+ deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="filesList" display
|
|
|
+ :enumerationValue="35.1"></c-upload>
|
|
|
+
|
|
|
+ <report-dialog :switchDialog="switchDialog" :reportId="form.id" @onClose="onClose()"></report-dialog>
|
|
|
+
|
|
|
+ <dialogAssembly ref="dialogAssemblyRef" :form="form"
|
|
|
+ @tableDataHandle="tableDataHandle">
|
|
|
+ </dialogAssembly>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+
|
|
|
+import {
|
|
|
+ getDetails,
|
|
|
+ tradingBox,
|
|
|
+ transferAllocateSubmit,
|
|
|
+ confirmTransferAllocate,
|
|
|
+ revokeTransferAllocate
|
|
|
+} from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
|
|
|
+import { dateFormat } from "@/util/date";
|
|
|
+import reportDialog from "@/components/report-dialog/main";
|
|
|
+import { dotList } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
|
+
|
|
|
+import dialogAssembly from "@/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue";
|
|
|
+import {getKh} from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
+
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "detailsPage",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData:[],
|
|
|
+ // 上传附件的需要参数
|
|
|
+ loadingBtn:false,
|
|
|
+ filesList:[],
|
|
|
+
|
|
|
+ switchDialog: false,
|
|
|
+ activeName: "sale_detail",
|
|
|
+ editButton: true,
|
|
|
+ isSave: true,
|
|
|
+ disabled: false,
|
|
|
+ isDisabled: false,
|
|
|
+ isAddDisabled: false,
|
|
|
+ form: {
|
|
|
+ shipItemsList: [],
|
|
|
+ shipVOList: [],
|
|
|
+ historyList: []
|
|
|
+ },
|
|
|
+ key: 0,
|
|
|
+ optionForm: {
|
|
|
+ disabled: false,
|
|
|
+ menuBtn: false,
|
|
|
+ span: 8,
|
|
|
+ column: [
|
|
|
+ // {
|
|
|
+ // label: '业务对象',
|
|
|
+ // disabled: false,
|
|
|
+ // prop: "customerId",
|
|
|
+ // type: 'select',
|
|
|
+ // props: {
|
|
|
+ // label: 'cname',
|
|
|
+ // value: 'id'
|
|
|
+ // },
|
|
|
+ // dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&enableOrNot=1',
|
|
|
+ // dicData:[],
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: " ",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }]
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '调出仓库',
|
|
|
+ prop: "storageId",
|
|
|
+ disabled: false,
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/storageDesc/listAll',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ label: '调入仓库',
|
|
|
+ prop: "callInStorageId",
|
|
|
+ disabled: false,
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/storageDesc/listAll',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ label: '库管',
|
|
|
+ prop: "stockClerkId",
|
|
|
+ type: 'select',
|
|
|
+ disabled: false,
|
|
|
+ props: {
|
|
|
+ label: 'realName',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-user/stockClerkList',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '业务日期',
|
|
|
+ prop: "businesDate",
|
|
|
+ searchProp: "businesDateList",
|
|
|
+ disabled: false,
|
|
|
+ type: "datetime",
|
|
|
+ value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
|
|
+ format: "yyyy-MM-dd HH:mm",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '调拨单号',
|
|
|
+ prop: "billno",
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '调拨数量',
|
|
|
+ prop: "goodsTotalNum",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: "remarks",
|
|
|
+ type: 'textarea',
|
|
|
+ disabled: false,
|
|
|
+ span: 16,
|
|
|
+ minRows: 1
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ formContacts: {},
|
|
|
+ optionContacts: {},
|
|
|
+ optionContactsBack: {
|
|
|
+ align: 'center',
|
|
|
+ index: true,
|
|
|
+ addBtnText: "录入明细",
|
|
|
+ updateBtnText: '保存',
|
|
|
+ refreshBtn: false,
|
|
|
+ dialogDrag: true,
|
|
|
+ addBtn: false,
|
|
|
+ span: 8,
|
|
|
+ height: 300,
|
|
|
+ addRowBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ menuWidth: 140,
|
|
|
+ dialogTop: 25,
|
|
|
+ dialogWidth: "80%",
|
|
|
+ showSummary: true,
|
|
|
+ sumColumnList: [
|
|
|
+ {
|
|
|
+ name: 'goodsNum',
|
|
|
+ type: 'sum',
|
|
|
+ }, {
|
|
|
+ name: 'sendNum',
|
|
|
+ type: 'sum',
|
|
|
+ }],
|
|
|
+ column: [{
|
|
|
+ label: '轮胎名称',
|
|
|
+ prop: 'goodsId',
|
|
|
+ // disabled: true,
|
|
|
+ width: 200,
|
|
|
+ overHidden: true,
|
|
|
+ hide:false,
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
|
|
|
+ }, {
|
|
|
+ label: '轮胎编码',
|
|
|
+ disabled: true,
|
|
|
+ prop: 'goodsNo',
|
|
|
+ width: 100
|
|
|
+ }, {
|
|
|
+ label: '品牌',
|
|
|
+ prop: 'brandId',
|
|
|
+ disabled: true,
|
|
|
+ width: 100,
|
|
|
+ overHidden: true,
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1'
|
|
|
+ }, {
|
|
|
+ label: '规格型号',
|
|
|
+ prop: 'propertyName',
|
|
|
+ disabled: true,
|
|
|
+ width: 100
|
|
|
+ }, {
|
|
|
+ label: '花纹',
|
|
|
+ prop: 'pattern',
|
|
|
+ disabled: true,
|
|
|
+ width: 100
|
|
|
+ }, {
|
|
|
+ label: '轮胎描述',
|
|
|
+ prop: 'goodsDescription',
|
|
|
+ disabled: true,
|
|
|
+ }, {
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'dot',
|
|
|
+ type: 'select',
|
|
|
+ // disabled: true,
|
|
|
+ dicData: [],
|
|
|
+ props: {
|
|
|
+ label: "dot",
|
|
|
+ value: "dot"
|
|
|
+ },
|
|
|
+ dicUrl: "/api/blade-sales-part/stockDesc/dotList",
|
|
|
+
|
|
|
+ },{
|
|
|
+ label: '库存数量',
|
|
|
+ prop: "inventory",
|
|
|
+ disabled: true,
|
|
|
+ }, {
|
|
|
+ label: '调拨数量',
|
|
|
+ prop: 'goodsNum',
|
|
|
+ disabled: false,
|
|
|
+ },{
|
|
|
+ label: '单位',
|
|
|
+ prop: 'units',
|
|
|
+ type: "select",
|
|
|
+ disabled: true,
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ },
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
|
|
|
+ }, {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks'
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ reportDialog,
|
|
|
+ dialogAssembly
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ onLoad: Object,
|
|
|
+ detailData: Object
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.optionContacts = await this.getColumnData(this.getColumnName(270.1), this.optionContactsBack);
|
|
|
+ this.key++
|
|
|
+ if (this.detailData.id) {
|
|
|
+ this.refresh()
|
|
|
+ }else {
|
|
|
+ this.editButton = false
|
|
|
+ this.isSave = false
|
|
|
+ }
|
|
|
+ this.$store.commit("DOMIO_IN_DETAIL");
|
|
|
+ },
|
|
|
+ activated(){
|
|
|
+ if (this.detailData.id) {
|
|
|
+ this.refresh()
|
|
|
+ }
|
|
|
+ this.$store.commit("DOMIO_IN_DETAIL");
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 撤销调拨
|
|
|
+ revoke() {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeTransferAllocate({
|
|
|
+ ...this.form,
|
|
|
+ bizTypeName: "DBGD"
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.refresh(res.data.data.id)
|
|
|
+ loading.close();
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ rowEdit(row, index) {
|
|
|
+ if (this.form.statusName == '待出库') {
|
|
|
+ this.optionContactsBack.column.forEach(its => {
|
|
|
+ if (its.prop == 'dot') {
|
|
|
+ this.$set(its, 'disabled', false)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log('this.formContacts.goodsId', this.formContacts.goodsId);
|
|
|
+ dotList({
|
|
|
+ storageId: this.form.storageId,
|
|
|
+ goodsId: row.goodsId
|
|
|
+ }).then(res => {
|
|
|
+ this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
|
|
|
+ })
|
|
|
+ this.$refs.formContacts.rowEdit(row, index)
|
|
|
+ },
|
|
|
+ // 确认调拨
|
|
|
+ complete() {
|
|
|
+ if (!this.form.id) {
|
|
|
+ this.$message.warning("请先保存数据");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ this.form.shipItemsList.forEach(item => {
|
|
|
+ item.goodsName = item.$goodsId
|
|
|
+ })
|
|
|
+ transferAllocateSubmit({
|
|
|
+ ...this.form,
|
|
|
+ bizTypeName: "DBGD"
|
|
|
+ }).then(res => {
|
|
|
+ confirmTransferAllocate({
|
|
|
+ ...this.form,
|
|
|
+ bizTypeName: "DBGD"
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success("调拨完成");
|
|
|
+ this.refresh(res.data.data.id)
|
|
|
+ loading.close();
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择库管')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //修改提交触发
|
|
|
+ editCustomer() {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ console.log(this.form)
|
|
|
+ this.form.shipItemsList.forEach(item => {
|
|
|
+ item.goodsName = item.$goodsId
|
|
|
+ })
|
|
|
+ // this.goodsName;
|
|
|
+ transferAllocateSubmit({
|
|
|
+ ...this.form,
|
|
|
+ bizTypeName: "DBGD",
|
|
|
+ filesList:this.filesList
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.refresh(res.data.data.id)
|
|
|
+ loading.close();
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ refresh(id, type) {
|
|
|
+ this.$set(this.optionContactsBack, 'addBtn', false)
|
|
|
+ this.$set(this.optionContacts, 'addBtn', false)
|
|
|
+ this.isDisabled = true
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ })
|
|
|
+ if (!this.detailData.id) {
|
|
|
+ getDetails({ id: id }).then(res => {
|
|
|
+ if (res.data.data.statusName == '确认调拨') {
|
|
|
+ this.$set(this.optionForm, 'disabled', true)
|
|
|
+ this.isAddDisabled = true
|
|
|
+ this.optionContacts.column.forEach(item => {
|
|
|
+ if (item.prop == 'sendNum') {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.isAddDisabled = true
|
|
|
+ if (res.data.data.statusName == '录入') {
|
|
|
+ this.isAddDisabled = true
|
|
|
+ this.isDisabled = true
|
|
|
+ }
|
|
|
+ this.form = res.data.data
|
|
|
+ this.filesList = res.data.data.filesList
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.formContacts.refreshTable()
|
|
|
+ })
|
|
|
+ loading.close();
|
|
|
+ }).catch(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ getDetails({ id: this.detailData.id }).then(res => {
|
|
|
+ if (res.data.data.statusName == '已出库') {
|
|
|
+ this.$set(this.optionForm, 'disabled', true)
|
|
|
+ this.isAddDisabled = true
|
|
|
+ this.optionContacts.column.forEach(item => {
|
|
|
+ if (item.prop == 'sendNum') {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.isAddDisabled = true
|
|
|
+ if (res.data.data.statusName == '待出库') {
|
|
|
+ this.isAddDisabled = true
|
|
|
+ this.isDisabled = true
|
|
|
+ }
|
|
|
+ this.form = res.data.data
|
|
|
+ this.filesList = res.data.data.filesList
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.formContacts.refreshTable()
|
|
|
+ })
|
|
|
+ loading.close();
|
|
|
+ }).catch(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowDelBox(row, index) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ tradingBox(row.id).then(res => {
|
|
|
+ this.form.shipItemsList.splice(index, 1);
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.form.shipItemsList.splice(index, 1);
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ ;
|
|
|
+ },
|
|
|
+ rowSave(form, done, loading) {
|
|
|
+ done(form)
|
|
|
+ },
|
|
|
+ rowUpdate(form, index, done, loading) {
|
|
|
+ done(form)
|
|
|
+ },
|
|
|
+ //打印
|
|
|
+ handlePrint() {
|
|
|
+ this.switchDialog = !this.switchDialog;
|
|
|
+
|
|
|
+ },
|
|
|
+ onClose(val) {
|
|
|
+ this.switchDialog = val;
|
|
|
+ },
|
|
|
+ // 新增出库明细
|
|
|
+ adddiailsfun(){
|
|
|
+ console.log(this.$refs.dialogAssemblyRef,635)
|
|
|
+ this.$refs.dialogAssemblyRef.dialogVisible = true
|
|
|
+ // this.dialogVisible = true
|
|
|
+ },
|
|
|
+ //编辑
|
|
|
+ confirmEditing() {
|
|
|
+ if (this.form.statusName == '录入') {
|
|
|
+ this.isDisabled = false
|
|
|
+ this.isSave = false
|
|
|
+ this.$set(this.optionForm, 'disabled', false)
|
|
|
+ this.optionForm.column.forEach(item => {
|
|
|
+ if (item.prop == 'storageId'
|
|
|
+ || item.prop == 'remarks'
|
|
|
+ || item.prop == 'createTime'
|
|
|
+ || item.prop == 'stockClerkId'
|
|
|
+ || item.prop == 'shipType'
|
|
|
+ || item.prop == 'logisticsCorpName'
|
|
|
+ || item.prop == 'expressNo') {
|
|
|
+ item.disabled = false
|
|
|
+ } else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.isAddDisabled = false
|
|
|
+ this.optionContactsBack.column.forEach(its => {
|
|
|
+ if (its.prop == 'dot') {
|
|
|
+ this.$set(its, 'disabled', false)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$set(this.optionForm, 'disabled', false)
|
|
|
+ this.isAddDisabled = true
|
|
|
+ this.isSave = false
|
|
|
+ // this.optionForm.column.forEach(item => {
|
|
|
+ // if (item.prop == 'remarks') {
|
|
|
+ // item.disabled = false
|
|
|
+ // } else {
|
|
|
+ // item.disabled = true
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ this.optionForm.column.forEach(item => {
|
|
|
+ item.disabled = true
|
|
|
+ })
|
|
|
+ // this.isAddDisabled = false
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 导入按钮事件
|
|
|
+ tableDataHandle(arr){
|
|
|
+ this.tableData = arr
|
|
|
+ // 循环获取库存数量
|
|
|
+ for(let item of this.tableData) {
|
|
|
+ let obj = {
|
|
|
+ goodsId:item.id,
|
|
|
+ price:item.price,
|
|
|
+ goodsName:item.cname,
|
|
|
+ goodsNum:item.goodsNum,
|
|
|
+ brandName:item.brandName,
|
|
|
+ brandId:item.brandId,
|
|
|
+ goodsNo:item.code,
|
|
|
+ propertyName: item.specificationAndModel,
|
|
|
+ inventory:item.inventory,
|
|
|
+ pattern:item.brandItem,
|
|
|
+ goodsDescription:item.goodsDescription,
|
|
|
+ dot:item.dot,
|
|
|
+ whether:item.whether,
|
|
|
+ units:item.unit,
|
|
|
+ // 小计
|
|
|
+ subTotalMoney:item.goodsNum * item.price,
|
|
|
+ // 备注
|
|
|
+ remarks:item.remarks,
|
|
|
+ // 批次号的状态
|
|
|
+ dotedittype:false,
|
|
|
+ // 价格数量
|
|
|
+ goodsNumtype:false,
|
|
|
+ // 价格
|
|
|
+ pricetype:false,
|
|
|
+ }
|
|
|
+ this.form.shipItemsList.push(obj)
|
|
|
+ }
|
|
|
+ this.$refs.dialogAssemblyRef.dialogVisible = false
|
|
|
+ // this.dialogVisible = false
|
|
|
+ },
|
|
|
+
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
+ this[option] = this[optionBack];
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ backToList(type) {
|
|
|
+ this.$emit("backToList", type);
|
|
|
+ // this.$store.commit("DOMIO_OUT_DETAIL");
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+::v-deep .el-form-item {
|
|
|
+ margin-bottom: 8px !important;
|
|
|
+}
|
|
|
+</style>
|