|
@@ -13,11 +13,39 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="tab">
|
|
|
- <dilTable v-bind.sync="option"></dilTable>
|
|
|
+ <dilTable v-bind.sync="option" ref="table1">
|
|
|
+ <!-- <el-table-column fixed="right" label="操作" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
|
|
|
+ 运单详情
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+ <!-- 物资详情抽屉 -->
|
|
|
+ <!-- <el-table-column type="expand" width="1">
|
|
|
+ <template slot-scope="props">
|
|
|
+ <el-form label-position="center" inline class="demo-table-expand">
|
|
|
+ <div v-if="false">{{ props }}</div>
|
|
|
+ <div>
|
|
|
+ <el-table :data="tableData" border >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, i) in tableHead"
|
|
|
+ :key="i"
|
|
|
+ :prop="item.prop"
|
|
|
+ :label="item.label"
|
|
|
+ :width="item.width"
|
|
|
+ ></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+ </dilTable>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { getCookie } from "@/utils/util.js";
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
@@ -26,25 +54,65 @@ export default {
|
|
|
// 表格请求数据的地址
|
|
|
requestUrl: "",
|
|
|
},
|
|
|
+ tableData: [],
|
|
|
+ oldRow1: "",
|
|
|
+ oldRowCount1: 1,
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
- this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=363"
|
|
|
+ if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode") == "wuliuchuyunzhongxin"){
|
|
|
+ this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458"
|
|
|
+ }else{
|
|
|
+ console.log("cookier"+getCookie("userId"))
|
|
|
+ this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId");
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
methods:{
|
|
|
- onclick(){
|
|
|
- this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=363&con="+this.inputText;
|
|
|
+ getRequirementMaterial1(row) {
|
|
|
+ // 记录重复点击次数
|
|
|
+ if (this.oldRow1 === row) {
|
|
|
+ this.oldRowCount1 += 1;
|
|
|
}
|
|
|
+ // 切换当前详情表
|
|
|
+ this.$refs.table1.toggleRowExpansion(row);
|
|
|
+ // 打开前关闭上一个详情表
|
|
|
+ if (this.oldRow1 != "") {
|
|
|
+ if (this.oldRow1 != row) {
|
|
|
+ if (this.oldRowCount1 % 2 === 1) {
|
|
|
+ this.$refs.table1.toggleRowExpansion(this.oldRow1);
|
|
|
+ } else {
|
|
|
+ this.oldRowCount1 = 1;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.oldRow1 = null;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 重置上一个点击对象
|
|
|
+ this.oldRow1 = row;
|
|
|
+ this.getMaterial(row.orderId);
|
|
|
+ },
|
|
|
+ onclick(){
|
|
|
+ this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId")+"&con="+this.inputText;
|
|
|
+ },
|
|
|
+ getMaterial(orderId){
|
|
|
+ console.log(orderId)
|
|
|
+ this.axios.post("/api/v1/oms/getPauseTimeTaskDetail/" + orderId).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.tableData = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.sale{
|
|
|
- .top{
|
|
|
- width: 100%;height: 5rem;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding-left: 2.5rem;
|
|
|
+ .top {
|
|
|
+ padding: 1.25rem 1.875rem;
|
|
|
+ .el-input{
|
|
|
+ width: 20%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|