|
@@ -166,12 +166,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <el-table
|
|
|
|
|
|
+ <ux-grid
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
:data="basicForm.puDemandItemList"
|
|
:data="basicForm.puDemandItemList"
|
|
- fit
|
|
|
|
border
|
|
border
|
|
- highlight-current-row
|
|
|
|
:cell-style="{ borderColor: '#c0c0c0' }"
|
|
:cell-style="{ borderColor: '#c0c0c0' }"
|
|
:header-cell-style="{ borderColor: '#c0c0c0' }"
|
|
:header-cell-style="{ borderColor: '#c0c0c0' }"
|
|
class="exporttable"
|
|
class="exporttable"
|
|
@@ -179,48 +177,49 @@
|
|
max-height="410"
|
|
max-height="410"
|
|
style="font-size: 12px;"
|
|
style="font-size: 12px;"
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
- @row-click="rowSelect"
|
|
|
|
:cell-class-name="cellClassName"
|
|
:cell-class-name="cellClassName"
|
|
- :row-key="getRowKeys"
|
|
|
|
ref="table"
|
|
ref="table"
|
|
- v-el-table-infinite-scroll="load"
|
|
|
|
- :infinite-scroll-disabled="loadDisabled"
|
|
|
|
|
|
+ :rules="tableRules"
|
|
|
|
+ show-header-overflow="tooltip"
|
|
|
|
+ show-overflow="tooltip"
|
|
|
|
+ keep-source
|
|
|
|
+ beautifyTable
|
|
|
|
+ :checkbox-config="{highlight: true, trigger: 'row'}"
|
|
|
|
+ :edit-config="{trigger: 'click', mode: 'row'}"
|
|
|
|
+ :validConfig="{autoPos: true}">
|
|
>
|
|
>
|
|
- <el-table-column show-overflow-tooltip type="selection" :reserve-selection="true" fixed="left"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo" fixed="left">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- {{ scope.row.rowNo = scope.$index + 1 + "0" }}
|
|
|
|
|
|
+ <ux-table-column resizable type="checkbox" fixed="left"/>
|
|
|
|
+ <ux-table-column resizable title="序号" type="index" align="center" width="50px"/>
|
|
|
|
+ <ux-table-column resizable title="行号" align="center" field="rowNo" width="50px">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ {{ scope.row.rowNo = scope.rowIndex + 1 + "0" }}
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="purOrgName" width="200px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="需求客户" align="center" prop="demandCustomerName" width="180px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="220px" :render-header="addRedStar" fixed="left">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'materialCode'" :show-message="false" :rules="{ required: true, message: '请选择物料编码', trigger: 'blur' }">
|
|
|
|
- <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.materialCode" @paste.native="pasteMe($event, scope, scope.$index)">
|
|
|
|
- <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.$index)"></el-button>
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="默认采购组织" align="center" field="purOrgName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="需求客户" align="center" field="demandCustomerName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="行状态" align="center" field="status" :formatter="hangStatus" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="物料编码" align="center" field="materialCode" width="150px" :render-header="addRedStar" :edit-render="{autofocus: '.el-input__inner'}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.materialCode" @paste.native="pasteMe($event, scope, scope.rowIndex)">
|
|
|
|
+ <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.rowIndex)"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="物料名称" align="center" prop="materialName" width="200px" fixed="left"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification" />
|
|
|
|
- <el-table-column show-overflow-tooltip label="型号" align="center" prop="model"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="单位" align="center" prop="unitName"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturerName" width="230px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="最小包装" align="center" prop="minPackage" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center" prop="qty" width="150px" :render-header="addRedStar">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :show-message="false" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
|
|
|
|
- <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)" @paste.native="pasteMe($event, scope, scope.$index)"/>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="物料名称" align="center" field="materialName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="规格" align="center" field="specification" width="50px"/>
|
|
|
|
+ <ux-table-column resizable title="型号" align="center" field="model" width="50px"/>
|
|
|
|
+ <ux-table-column resizable title="单位" align="center" field="unitName" width="50px"/>
|
|
|
|
+ <ux-table-column resizable title="生产厂家/代理人" align="center" field="manufacturerName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="最小包装" align="center" field="minPackage" width="80px"/>
|
|
|
|
+ <ux-table-column resizable title="月均销量" align="center" field="averageQtyMonth" width="80px"/>
|
|
|
|
+ <ux-table-column resizable title="需求可用周期" align="center" field="demandPeriod" width="80px"/>
|
|
|
|
+ <ux-table-column resizable title="实际(业务)需求量" align="center" field="qty" width="150px" :render-header="addRedStar" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)" @paste.native="pasteMe($event, scope, scope.rowIndex)"/>
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency" width="100px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="紧急标识" align="center" field="isUrgency" width="100px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-switch
|
|
<el-switch
|
|
v-model="scope.row.isUrgency"
|
|
v-model="scope.row.isUrgency"
|
|
:disabled="sonDisable"
|
|
:disabled="sonDisable"
|
|
@@ -229,48 +228,39 @@
|
|
active-color="#13ce66"
|
|
active-color="#13ce66"
|
|
inactive-color="#a1a3a9">
|
|
inactive-color="#a1a3a9">
|
|
</el-switch>
|
|
</el-switch>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="收货仓库" align="center" prop="deliveryWarehouseName" width="200px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
- <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')">
|
|
|
|
- <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseCangKu(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库', scope.row.puOrg)"></el-button>
|
|
|
|
|
|
+ <template v-slot="{ row }">{{ row.isUrgency == 'Y' ? '是' : '否' }}</template>
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="收货仓库" align="center" field="deliveryWarehouseName" width="200px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.rowIndex, '选择收货仓库')">
|
|
|
|
+ <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseCangKu(scope.rowIndex, 'WAREHOUSE_PARAM', true, '选择收货仓库', scope.row.puOrg)"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="收货货位" align="center" prop="deliveryAllocationName" width="200px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
- <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')">
|
|
|
|
- <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="收货货位" align="center" field="deliveryAllocationName" width="200px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.rowIndex, '选择收货货位')">
|
|
|
|
+ <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.rowIndex, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="月均销量" align="center" prop="averageQtyMonth" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="需求可用周期" align="center" prop="demandPeriod" width="120px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="业务备注" align="center" prop="remark" width="150px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="业务备注" align="center" field="remark" width="150px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.remark"/>
|
|
<el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.remark"/>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="物料一级分类" align="center" prop="materialClassifyOneName" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="物料二级分类" align="center" prop="materialClassifyTwoName" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="物料三级分类" align="center" prop="materialClassifyThreeName" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="物料四级分类" align="center" prop="materialClassifyFourName" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="最小批量" align="center" prop="minBatch" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="最小订货量" align="center" prop="minOrderQty" width="120px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="100px"/>
|
|
|
|
- <!-- <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyer"/> -->
|
|
|
|
- <el-table-column show-overflow-tooltip label="采购周期" align="center" prop="puPeriod" width="120px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="交货日期" align="center" prop="deliveryDate" width="230px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="物料一级分类" align="center" field="materialClassifyOneName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="物料二级分类" align="center" field="materialClassifyTwoName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="物料三级分类" align="center" field="materialClassifyThreeName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="物料四级分类" align="center" field="materialClassifyFourName" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="最小批量" align="center" field="minBatch" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="最小订货量" align="center" field="minOrderQty" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="采购员" align="center" field="buyerName" width="100px"/>
|
|
|
|
+ <!-- <ux-table-column resizable title="采购员" align="center" field="buyer"/> -->
|
|
|
|
+ <ux-table-column resizable title="采购周期" align="center" field="puPeriod" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="交货日期" align="center" field="deliveryDate" width="230px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="scope.row.deliveryDate"
|
|
v-model="scope.row.deliveryDate"
|
|
:disabled="sonDisable"
|
|
:disabled="sonDisable"
|
|
@@ -281,38 +271,32 @@
|
|
:picker-options="pickerOptionsEnd"
|
|
:picker-options="pickerOptionsEnd"
|
|
placeholder="选择日期">
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="有效期" align="center" prop="expiry" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="有效期单位" align="center" prop="expiryUnit" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="安全库存" align="center" prop="safeStock" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="120px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="有效期" align="center" field="expiry" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="有效期单位" align="center" field="expiryUnit" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="安全库存" align="center" field="safeStock" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="注册人" align="center" field="registrant" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="预留比例" align="center" field="reservedProportion" width="120px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @change="getYLSL(scope)" @clear="cleanYLSL(scope)">
|
|
<el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @change="getYLSL(scope)" @clear="cleanYLSL(scope)">
|
|
<el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
<el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="预留周期" align="center" prop="reservedPeriod" width="120px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'reservedPeriod'" :rules="{ required: scope.row.reservedProportion && scope.row.reservedProportion !== '' , message: '请填写预留周期', trigger: 'blur' }">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="预留周期" align="center" field="reservedPeriod" width="120px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
|
|
<el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="预留数量" align="center" prop="reservedQty" width="120px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="集团预测分类" align="center" prop="forecastClassify" width="120px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="近一月需求" align="center" prop="onemonthAvgVolume" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="近三月需求" align="center" prop="threemonthAvgVolume" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="采购在途" align="center" prop="puFreight" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="补单标识" align="center" prop="isReplenishment" width="100px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="预留数量" align="center" field="reservedQty" width="120px"/>
|
|
|
|
+ <ux-table-column resizable title="集团预测分类" align="center" field="forecastClassify" width="120px"/>
|
|
|
|
+ <ux-table-column resizable title="近一月需求" align="center" field="onemonthAvgVolume" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="近三月需求" align="center" field="threemonthAvgVolume" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="采购在途" align="center" field="puFreight" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="补单标识" align="center" field="isReplenishment" width="100px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-switch
|
|
<el-switch
|
|
v-model="scope.row.isReplenishment"
|
|
v-model="scope.row.isReplenishment"
|
|
disabled
|
|
disabled
|
|
@@ -321,25 +305,22 @@
|
|
active-color="#13ce66"
|
|
active-color="#13ce66"
|
|
inactive-color="#a1a3a9">
|
|
inactive-color="#a1a3a9">
|
|
</el-switch>
|
|
</el-switch>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="补单供应商" align="center" prop="additionalSupplierName" width="200px" :render-header="anotherRedStar">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'additionalSupplierName'" :rules="{ required: isBDXQ, message: '请选择补单供应商', trigger: 'blur' }">
|
|
|
|
- <el-input clearable :disabled="sonDisable || BDZT" size="mini" v-model="scope.row.additionalSupplierName" @clear="clearHang(scope.$index, '选择补单供应商')" @paste.native="pasteMe($event, scope, scope.$index)">
|
|
|
|
- <el-button size="mini" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
|
|
|
|
|
|
+ <template v-slot="{ row }">{{ row.isReplenishment == 'Y' ? '是' : '否' }}</template>
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="补单供应商" align="center" field="additionalSupplierName" width="200px" :render-header="anotherRedStar" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input clearable :disabled="sonDisable || BDZT" size="mini" v-model="scope.row.additionalSupplierName" @clear="clearHang(scope.rowIndex, '选择补单供应商')" @paste.native="pasteMe($event, scope, scope.rowIndex)">
|
|
|
|
+ <el-button size="mini" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.rowIndex, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="末级供应库存组织" align="center" prop="lastStockOrgName" width="180px"></el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="末级供应仓库" align="center" prop="lastWarehouseName" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="末级供应货位" align="center" prop="lastAllocationName" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="中心仓可用量" align="center" prop="centralWarehouseQty" width="120px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="调拨状态" align="center" prop="statusAllot" width="100px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="末级供应库存组织" align="center" field="lastStockOrgName" width="180px"></ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="末级供应仓库" align="center" field="lastWarehouseName" width="150px"/>
|
|
|
|
+ <ux-table-column resizable title="末级供应货位" align="center" field="lastAllocationName" width="150px"/>
|
|
|
|
+ <ux-table-column resizable title="中心仓可用量" align="center" field="centralWarehouseQty" width="120px"/>
|
|
|
|
+ <ux-table-column resizable title="调拨状态" align="center" field="statusAllot" width="100px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-switch
|
|
<el-switch
|
|
v-model="scope.row.statusAllot"
|
|
v-model="scope.row.statusAllot"
|
|
:disabled="sonDisable"
|
|
:disabled="sonDisable"
|
|
@@ -348,42 +329,38 @@
|
|
active-color="#13ce66"
|
|
active-color="#13ce66"
|
|
inactive-color="#a1a3a9">
|
|
inactive-color="#a1a3a9">
|
|
</el-switch>
|
|
</el-switch>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="调拨单号" align="center" prop="allotCode"></el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="调拨占有量" align="center" prop="allotQty" width="100px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="最终净需求量" align="center" prop="resDemandQty" width="120px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="最终采购执行数量" align="center" prop="executeQty" width="150px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
|
+ <template v-slot="{ row }">{{ row.statusAllot == 'Y' ? '是' : '否' }}</template>
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="调拨单号" align="center" field="allotCode"></ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="调拨占有量" align="center" field="allotQty" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="最终净需求量" align="center" field="resDemandQty" width="120px"/>
|
|
|
|
+ <ux-table-column resizable title="最终采购执行数量" align="center" field="executeQty" width="150px">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
{{ scope.row.executeQty ? scope.row.executeQty : 0 }}
|
|
{{ scope.row.executeQty ? scope.row.executeQty : 0 }}
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="收货地址" align="center" prop="deliveryAddressName" width="200px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
- <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.$index, '选择收货地址')" @paste.native="pasteMe($event, scope, scope.$index)">
|
|
|
|
- <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="收货地址" align="center" field="deliveryAddressName" width="200px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.rowIndex, '选择收货地址')" @paste.native="pasteMe($event, scope, scope.rowIndex)">
|
|
|
|
+ <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.rowIndex, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="联系人" align="center" prop="contacts"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="联系人电话" align="center" prop="contactsPhone" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="详细地址" align="center" prop="address" width="200px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="120px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'priceType'" :show-message="false" :rules="{ required: true, message: '请选择价格类型', trigger: 'blur' }">
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="联系人" align="center" field="contacts" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="联系人电话" align="center" field="contactsPhone" width="150px"/>
|
|
|
|
+ <ux-table-column resizable title="详细地址" align="center" field="address" width="150px"/>
|
|
|
|
+ <ux-table-column resizable title="价格类型" align="center" field="priceType" width="120px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.priceType">
|
|
<el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.priceType">
|
|
<el-option v-for=" dict in dict.type.sys_price_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
<el-option v-for=" dict in dict.type.sys_price_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column show-overflow-tooltip label="是否客户指定" align="center" prop="isCustomerSpecified" width="120px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-form-item class="hang">
|
|
|
|
|
|
+ <template v-slot="{ row }">{{ row.priceType == 'order' ? '订货价' : row.priceType == 'consignment' ? '寄售价' : row.priceType == 'adjusted' ? '调货价' : ''}}</template>
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <ux-table-column resizable title="是否客户指定" align="center" field="isCustomerSpecified" width="120px" edit-render>
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-switch
|
|
<el-switch
|
|
v-model="scope.row.isCustomerSpecified"
|
|
v-model="scope.row.isCustomerSpecified"
|
|
disabled
|
|
disabled
|
|
@@ -392,11 +369,11 @@
|
|
active-color="#13ce66"
|
|
active-color="#13ce66"
|
|
inactive-color="#a1a3a9">
|
|
inactive-color="#a1a3a9">
|
|
</el-switch>
|
|
</el-switch>
|
|
- </el-form-item>
|
|
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <!-- <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="100px">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
|
+ <template v-slot="{ row }">{{ row.isCustomerSpecified == 'Y' ? '是' : '否' }}</template>
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ <!-- <ux-table-column resizable title="批号锁定标识" align="center" field="isBatchLock" width="100px">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
<el-form-item class="hang">
|
|
<el-form-item class="hang">
|
|
<el-switch
|
|
<el-switch
|
|
v-model="scope.row.isBatchLock"
|
|
v-model="scope.row.isBatchLock"
|
|
@@ -408,20 +385,21 @@
|
|
</el-switch>
|
|
</el-switch>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
- </el-table-column> -->
|
|
|
|
- <el-table-column show-overflow-tooltip label="采购备注" align="center" prop="updateCause" width="150px"/>
|
|
|
|
- <el-table-column show-overflow-tooltip label="可用量" align="center" prop="availableQty"/>
|
|
|
|
|
|
+ </ux-table-column> -->
|
|
|
|
+ <ux-table-column resizable title="采购备注" align="center" field="updateCause" width="100px"/>
|
|
|
|
+ <ux-table-column resizable title="可用量" align="center" field="availableQty" width="100px"/>
|
|
|
|
|
|
- <el-table-column
|
|
|
|
|
|
+ <ux-table-column
|
|
fixed="right"
|
|
fixed="right"
|
|
- label="操作"
|
|
|
|
|
|
+ title="操作"
|
|
|
|
+ width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="mini" :disabled="sonDisable" @click="delLine(scope.$index, scope.row)">删除</el-button>
|
|
|
|
|
|
+ <el-button type="text" size="mini" :disabled="sonDisable" @click="delLine(scope.rowIndex, scope.row)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ </ux-table-column>
|
|
|
|
+ </ux-grid>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="btn_group">
|
|
<div class="btn_group">
|
|
<el-button type="primary" size="mini" @click="jumpOA" v-if="sonPageStu == 'check' && (row.status == '1' || row.status == '2') && basicForm.flowId">流程跳转</el-button>
|
|
<el-button type="primary" size="mini" @click="jumpOA" v-if="sonPageStu == 'check' && (row.status == '1' || row.status == '2') && basicForm.flowId">流程跳转</el-button>
|
|
@@ -530,6 +508,7 @@ import {getRefer} from '@/api/purchase/basic.js'
|
|
// 明细行选择物料参照
|
|
// 明细行选择物料参照
|
|
import popDialog from '@/components/PopDialog/index.vue'
|
|
import popDialog from '@/components/PopDialog/index.vue'
|
|
import ElTableInfiniteScroll from "el-table-infinite-scroll";
|
|
import ElTableInfiniteScroll from "el-table-infinite-scroll";
|
|
|
|
+import 'regenerator-runtime/runtime'
|
|
export default {
|
|
export default {
|
|
directives: {
|
|
directives: {
|
|
"el-table-infinite-scroll": ElTableInfiniteScroll,
|
|
"el-table-infinite-scroll": ElTableInfiniteScroll,
|
|
@@ -743,6 +722,11 @@ export default {
|
|
loadDisabled: true,
|
|
loadDisabled: true,
|
|
page: 0,
|
|
page: 0,
|
|
total: 5,
|
|
total: 5,
|
|
|
|
+ // 表格校验规则
|
|
|
|
+ tableRules: {
|
|
|
|
+ materialCode : [{required: true, message: '物料编码必填'}],
|
|
|
|
+ qty: [{required: true, message: '实际业务需求量必填'}],
|
|
|
|
+ },
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -863,7 +847,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
hangStatus(row) {
|
|
hangStatus(row) {
|
|
- switch (row.status) {
|
|
|
|
|
|
+ switch (row.row.status) {
|
|
case '0':
|
|
case '0':
|
|
return '需补货'
|
|
return '需补货'
|
|
case '1':
|
|
case '1':
|
|
@@ -977,37 +961,55 @@ export default {
|
|
if(this.basicForm.puDemandItemList.length !== 0) {
|
|
if(this.basicForm.puDemandItemList.length !== 0) {
|
|
this.$refs['basic'].validate((valid, obj) => {
|
|
this.$refs['basic'].validate((valid, obj) => {
|
|
if(valid) {
|
|
if(valid) {
|
|
- this.$modal.loading("保存中...");
|
|
|
|
- if(this.sonPageStu == 'add') {
|
|
|
|
- this.handleData()
|
|
|
|
- addDemand(this.basicForm).then(res => {
|
|
|
|
- console.log(333)
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$modal.notifySuccess(res.msg);
|
|
|
|
- this.$modal.closeLoading();
|
|
|
|
- this.back()
|
|
|
|
- }
|
|
|
|
- }).catch(err => {
|
|
|
|
- this.$modal.closeLoading();
|
|
|
|
- })
|
|
|
|
- } else if (this.sonPageStu == 'edit') {
|
|
|
|
- let list = []
|
|
|
|
- list.push(...this.basicForm.puDemandItemList, ...this.delDemandItemList)
|
|
|
|
- // 深拷贝一下参数对象
|
|
|
|
- let param = JSON.parse(JSON.stringify(this.basicForm))
|
|
|
|
- console.log('深拷贝对象',param);
|
|
|
|
- param.puDemandItemList = list
|
|
|
|
- // this.basicForm.puDemandItemList.push(...this.delDemandItemList)
|
|
|
|
- editDemand(param).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$modal.notifySuccess(res.msg);
|
|
|
|
- this.$modal.closeLoading();
|
|
|
|
- this.back()
|
|
|
|
|
|
+ // 加上表格校验
|
|
|
|
+ this.$refs.table.fullValidate().then(data=> {
|
|
|
|
+ if(!data) {
|
|
|
|
+ this.$modal.loading("保存中...");
|
|
|
|
+ if(this.sonPageStu == 'add') {
|
|
|
|
+ this.handleData()
|
|
|
|
+ addDemand(this.basicForm).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$modal.notifySuccess(res.msg);
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ this.back()
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ })
|
|
|
|
+ } else if (this.sonPageStu == 'edit') {
|
|
|
|
+ let list = []
|
|
|
|
+ list.push(...this.basicForm.puDemandItemList, ...this.delDemandItemList)
|
|
|
|
+ // 深拷贝一下参数对象
|
|
|
|
+ let param = JSON.parse(JSON.stringify(this.basicForm))
|
|
|
|
+ console.log('深拷贝对象',param);
|
|
|
|
+ param.puDemandItemList = list
|
|
|
|
+ // this.basicForm.puDemandItemList.push(...this.delDemandItemList)
|
|
|
|
+ editDemand(param).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$modal.notifySuccess(res.msg);
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ this.back()
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- }).catch(err => {
|
|
|
|
- this.$modal.closeLoading();
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ let masStr = ''
|
|
|
|
+ Object.values(data).forEach(errList => {
|
|
|
|
+ console.log('data',data)
|
|
|
|
+ console.log(errList)
|
|
|
|
+ errList.forEach(params => {
|
|
|
|
+ let { rowIndex, column, rules } = params
|
|
|
|
+ rules.forEach(rule => {
|
|
|
|
+ masStr += `第 ${rowIndex + 1} 行${rule.message};`
|
|
|
|
+ })
|
|
|
|
+ this.$refs.table.$el.querySelector(`.elx-body--row:nth-of-type(${rowIndex+1})`).style.background = '#f34b4bb8'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ this.$modal.notifyError(masStr);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
// 校验加弹窗
|
|
// 校验加弹窗
|
|
const jiaoyan = []
|
|
const jiaoyan = []
|
|
@@ -1105,7 +1107,7 @@ export default {
|
|
},
|
|
},
|
|
// 单元格标红
|
|
// 单元格标红
|
|
cellClassName({row, column, rowIndex, columnIndex}) {
|
|
cellClassName({row, column, rowIndex, columnIndex}) {
|
|
- if(this.basicForm.isCustomerSpecified == 'N' && column.label == '需求可用周期' && Number(row.demandPeriod) > 1.5 && Number(row.qty) > Number(row.minOrderQty)) {
|
|
|
|
|
|
+ if(this.basicForm.isCustomerSpecified == 'N' && column.title == "需求可用周期" && Number(row.demandPeriod) > 1.5 && Number(row.qty) > Number(row.minOrderQty)) {
|
|
return 'success-row';
|
|
return 'success-row';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1766,10 +1768,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 解决表格选中了又自动取消的问题
|
|
|
|
- getRowKeys(row) {
|
|
|
|
- return row.id
|
|
|
|
- },
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -1799,11 +1797,11 @@ export default {
|
|
// padding-top: 0;
|
|
// padding-top: 0;
|
|
// top: 70%
|
|
// top: 70%
|
|
// }
|
|
// }
|
|
-.el-table ::v-deep .success-row {
|
|
|
|
- background: #f11616;
|
|
|
|
|
|
+::v-deep .elx-body--row .success-row {
|
|
|
|
+ background-color: #f11616!important;
|
|
}
|
|
}
|
|
-::v-deep .el-table__row > td {
|
|
|
|
- border-right: none;
|
|
|
|
|
|
+::v-deep .uxbeautifyTableClass .elx-table--header-wrapper {
|
|
|
|
+ color: #606266;
|
|
}
|
|
}
|
|
.pltzTxt{
|
|
.pltzTxt{
|
|
text-align: right;
|
|
text-align: right;
|